nextcloud / notes

✎ Distraction-free notes and writing
https://apps.nextcloud.com/apps/notes
GNU Affero General Public License v3.0
612 stars 134 forks source link

images have different relative URL in text app: "apps/files" vs. "apps/notes" when images are in "resources/" folder #1058

Open ant0nwax opened 1 year ago

ant0nwax commented 1 year ago

More than one year no one assigned :( just very simple fix @blizzz please could you be so kind and assign someone who works on notes app

Precondition in my case: Migration from G___le Keep

3 different scenarios on Desktop:

I.) Nextcloud Desktop Sync folder. SUCCESS

II.) Nextcloud Web App FILES on a Desktop in a browser window SUCCESS

opening from

 https://example.com/nextcloud/index.php/apps/files/files/98349?dir=/Notes&openfile=true

SUCCESS attachment image is displayed

III.) Nextcloud Web App NOTES on a Desktop in a browser window FAILED / ERROR

opening from

 https://example.com/nextcloud/index.php/apps/notes/note/98349

ERROR 404 attachment is not displayed

Errors in the browser console:

error 1: https://example.com/nextcloud/index.php/apps/notes/note/resources/18432988c62.80ce147f7b821377.jpg 404
error 2: https://example.com/nextcloud/remote.php/dav/files/ant0n/resources/18432988c62.80ce147f7b821377.jpg 404

Living and growing with this software error after reporting for three major versions, first debugging allowed me to use notes very little, not so much user friendly because i was used to attachments.

A new hint:

Check for the attachment on the command line interface of the nextcloud on-premise server

​ Test 1:

[root@antcloud ant0n]# pwd && find -type f -name 18432988c62.80ce147f7b821377.jpg 
/var/www/data/ant0n
./files/Notes/resources/18432988c62.80ce147f7b821377.jpg
[root@antcloud notes]#

​ Test 2:

[root@antcloud notes]# pwd && find -type f -name 18432988c62.80ce147f7b821377.jpg 
/var/www/html/nextcloud/apps/notes
[root@antcloud notes]#
AndreaPro commented 1 year ago

I have tried importing notes exported as MD from Joplin and the result is the same

ant0nwax commented 1 month ago

@AndreaPro did you reproduce the new test case? there is no need for anything else than one note and one attachment, could be a new note too i think, or does it only happen with imported notes?

ant0nwax commented 1 month ago

@joshtrichards may I ask politely, this is a bug and not a feature. the files app displays an attachment, the notes app does not display it... was the notes app never capable of displaying attachments? Thank you for a short reply instead of silence :)

ant0nwax commented 3 weeks ago

@AndreaPro @joshtrichards @blizzz

I am excited to announce that I found a W O R K A R O U N D ! !

added symbolic link at /var/www/data/[USErNAME]/files

ln -s Notes/resources/ resources

Now the Notes App in the browser displays the attachment, too.

Maybe this will help the notes app developers?

PS, on my Andoird Device the nextcloud Notes App (not Nextcloud notes in a browser but the dedicated Notes Android Application) does still not display the image attachment of the MD file (not in native and not in rich text mode)