To Arunnbabu and Mark:
On file reference
For my purpose, the file reference is useful by itself to know where the file is located. TW allows me to keep info and make notes about the files. I can do searches, sort and filter on these files using the file info and notes.
For a file “Sleepy Hippo.gif” in folder “My Files/Pictures”, i will end up with these absolute file paths:
Windows “/C:/My%20Files/Pictures/misc/Sleepy Hippo.gif”
Android “/storage/emulated/0/My%20Files/Pictures/misc/Sleepy%20Hippo.gif”
Chromebook “/media/fuse/android_files/My%20Files/Pictures/misc/Sleepy%20Hippo.gif”
On accessing the files from TW
It is useful also to be able to open the files from within TW.
To display the image in TW, I use html syntax :
<img src="/media/fuse/android_files/My%20Files/Pictures/misc/Sleepy%20Hippo.gif" />
To provide a file reference to launch the image file:
<a href="file:/media/fuse/android_files/My%20Files/Pictures/misc/Sleepy%20Hippo.gif">Sleepy Hippo.gif</a>
For images, this mostly works for me so far. One exception I encountered is images on external storage on Android Chromebook.
i don’t have much experience with using canonical_uri. It doubles the number of tiddlers I suspect I have not yet discover the usefulness of canonical_uri. So far, I’m not particular with the placement of images in my application.
I do the same for other files like PDF, TXT, EPUB etc, with varying success depending on the file types, OS, browser, apps installed, and for Android devices, even the particular models due to manufacturer customization. Generally, Windows has the most success in opening a file. Often, a browser will download the file instead. Sometimes, the browser will download the file and then immediately launch it successfully, giving the appearance that it supports direct access to the file.
Anyway, I normally use other apps to open the files (EPUB, PDF, TXT), so launching the files from within TW is more of a convenience and not a showstopper for my purpose. I guess that may not be the case for your usage.
For Chrome browser on Android, TW files must be in Chrome Download folder
Oh, I just remember one motivation for me to use absolute path. On Android, Chrome browser requires html file itself, such as TW file, to be in Chrome Download directory, which is “/storage/emulated/0/Android/data/com.android.chrome/files/Download/” on my phone now. My TW files on Android are in Chrome Download directory. You can get around Chrome by using Tiddloid or webdav to launch TW.
External media files (i.e. images, video, MP3 ) elsewhere are still accessible using absolute path when the TW file itself is in Chrome Download directory. Relative path won’t work unless my external files are all under Chrome Download directory which is no-go for me. There are so many caveats for external files