orgzly / orgzly-android

Outliner for taking notes and managing to-do lists
https://www.orgzly.com
GNU General Public License v3.0
2.69k stars 306 forks source link

Android 11: linking to images on internal storage #847

Open pbienst opened 3 years ago

pbienst commented 3 years ago

After upgrading to Android 11, Syncthing only works reliably on the internal memory, and not on the SD card. This seems to break the possibility to display inline images using orgzly.

Previously, I could use links like

[[/storage/3738-3234/Syncthing/org/foo.png]]

But now, on the internal storage, my org files seem to be located at

[[content://com.android.externalstorage.documents/tree/primary%3ASyncthing%2Forg%2Ffoo.png]]

(at least that's what I deduce by looking at the path that orgly lists for its synced folders)

However, this link does not work.

What is the required syntax to display images on internal storage under Android 11?

xiaoruoruo commented 2 years ago

There is a new option in v1.8.5 that you can try out. Check the preference in Settings -> Notes & Notebooks -> "Root for absolute links" and "Root for relative links.

For example, if your images are in the same folder as your org file. Set "Root for relative links" to /storage/3738-3234/Syncthing/org/. Then [[file:foo.png]] will resolve to /storage/3738-3234/Syncthing/org/foo.png.

Others have reported that using root /storage/emulated/0/help, so you can also try /storage/emulated/0/Syncthing/org.