Notes: import/scan folder

Created on 4 Apr 2017  Â·  10Comments  Â·  Source: nextcloud/notes

Hi i recently transfered my notes from ios to my nextcloud and I love this app. I placed all my notes in the Notes folder made by this app but they do not apear in the notes app, The app should have an import (drag and drop .txt and .md files) and should scan the folder for missing notes in the app gui.

enhancement

Most helpful comment

i disaggree. a button for such a special use case is not needed, especially there are multiple ways to prevent your problem.
If the mentioned 3rd party notes apps are using the official api of the notes app, there is no problem. if they are using the officially recommended web dav api of the files app, no problem occurs. why should anyone want to create the trxt files directly on the filesystem? this causes inconsistences since nextcloud is not designed for this use case (therefore the occ command to clean up and fix such inconcistences)

All 10 comments

Uploading .txt and .md files using the files app in Nextcloud should work: the notes app will "see" them automatically when you start the app the next time. If you load the files directly to the data directory in the filesystem of your installation, you have to rescan the files using the occ command. Which way did you used?

However, dragging new files directly to the notes app is a nice enhancement. Pull requests are welcome ;-)

I didnt know the occ command existed. I have been uploading notes using the files app. But i think it would be better to have a button to rescan the folder instead of always having to connect to my server via ssh and calling a command. This would help for anyone using a 3rd party notes app which just creates the .txt file

i disaggree. a button for such a special use case is not needed, especially there are multiple ways to prevent your problem.
If the mentioned 3rd party notes apps are using the official api of the notes app, there is no problem. if they are using the officially recommended web dav api of the files app, no problem occurs. why should anyone want to create the trxt files directly on the filesystem? this causes inconsistences since nextcloud is not designed for this use case (therefore the occ command to clean up and fix such inconcistences)

I didnt know the occ command existed. I have been uploading notes using the files app

Then you don't need that command at all. New files will be shown automatically. If this doesn't work on your installation, you have to investigate why it doesn't work.

  • Do you see new notes created by the notes app? Please add multiple notes with simple content using the notes app. Background: there is a problem if your imported notes contain non-utf8 chars, then no notes are shown, see #73
  • Otherwise the filename of your imported could be problematic (allthough there is no known bug). Please try adding a file called test.txt.

I've uploaded txt files UTF-8 encoded but notes app doesn't "see" them. If I create new note within app it works OK. I've done occ files scan but it doesn't help and in logs there is nothing that would point to any problem.

I have the same problem.
I notice that when I go to https://mydomain.ext/index.php/apps/notes/api/v0.2/notes I get an "Internal Server Error".
But https://mydomain.ext/index.php/apps/notes/api/v0.2/notes/1234 where "123" is a file ID I get a normal JSON output.

In Nextcloud logs I find something like that, without exception information:

{"reqId":"gBNaxD1K8zvtfP4RVhVF","remoteAddr":"111.222.333.444","app":"index","message":"Exception: ","level":3,"time":"2017-05-01T05:31:21+00:00","method":"GET","url":"\/index.php\/apps\/notes\/api\/v0.2\/notes","user":"myuser","version":"11.0.2.7"}

Well I've give up on this. I've modiffied ownnote info file and I'm back to using ownnote.

I am having the same issue.

  • Have done an OCC rescan of files.
  • Removed notes app and pulled a fresh one from this repo
  • I can create new notes, and those sync and are added to the Notes folder on other devices etc
  • None of my old notes will show up though.

I don't know if this is related, but after about a minute on the notes app in chrome I get this error in the console:

angular.js?v=0a5ac41…:10722 GET https://nextcloud.mydomain.com/index.php/apps/notes/notes 504 (Gateway Time-out)
(anonymous) @   angular.js?v=0a5ac41…:10722
sendReq @   angular.js?v=0a5ac41…:10515
serverRequest   @   angular.js?v=0a5ac41…:10222
processQueue    @   angular.js?v=0a5ac41…:14745
(anonymous) @   angular.js?v=0a5ac41…:14761
$eval   @   angular.js?v=0a5ac41…:15989
$digest @   angular.js?v=0a5ac41…:15800
$apply  @   angular.js?v=0a5ac41…:16097
bootstrapApply  @   angular.js?v=0a5ac41…:1660
invoke  @   angular.js?v=0a5ac41…:4478
doBootstrap @   angular.js?v=0a5ac41…:1658
bootstrap   @   angular.js?v=0a5ac41…:1678
angularInit @   angular.js?v=0a5ac41…:1572
(anonymous) @   angular.js?v=0a5ac41…:28899
j   @   jquery.js:3099
fireWith    @   jquery.js:3211
ready   @   jquery.js:3417
I   @   jquery.js:3433

btw - if anyone is using docker, here is the command to do an OCC rescan:
SSH into your server and:
sudo docker exec --user www-data nextcloud_fpm php occ files:scan --all
You may need to change 'nextcloud_fpm' in that command to match your container name.

Would be nice with a DB importer as well for everyone using ownNote and that are not saving the notes as files but only in DB.

Closing because of missing info. If you encounter this again, please open a new issue and make sure you fill out the issue template. Then we can help debug the problem. Thank you :heart:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Larsene picture Larsene  Â·  6Comments

trymeouteh picture trymeouteh  Â·  6Comments

korelstar picture korelstar  Â·  3Comments

Tuxyso picture Tuxyso  Â·  5Comments

CodeAlDente picture CodeAlDente  Â·  3Comments