Large Attachments TW5

53 views
Skip to first unread message

joearms

unread,
Mar 2, 2018, 1:14:50 PM3/2/18
to TiddlyWikiDev
I was wondering about attachments in the node/server version of TW5

It might be me but I find the act of attaching a file to TW5 overly complicated,
and I still haven't figured out how to do this :-(
 
What I'd like:

In the TW file system there is a directory called 'attachments'
(parallel to tiddlers) - if you drop a file into this directory
by ANY method it would be considered an attachment.

I'd like to transclude it with a simple syntax
<<attach name.pdf>> or <<attach pic.jpg>>
which just works (TM)

For large files (movies etc) it would seem
important to store them "off wiki" - so this is only for the 
sever version of TW.

Is this possible

/Joe





Andreas Hahn

unread,
Mar 2, 2018, 2:55:06 PM3/2/18
to tiddly...@googlegroups.com
Hi Joe,

this is most definitely possible and something I think most people in
the community already use. The way I do it is to put these "external"
files into a "files/" directory in the node server directory and add a
tiddler with the "_canonical_uri" field set to the relative path to the
file, so that TW can work its magic when displaying them, i.e. in a
player for audio/video or in a frame for pdf files or just displaying
them as images.

While I use a simple server modification to do this, there is Arlen's
TiddlyServer [1] to accomplish this or alternatively the http-server
branch [2] in the TiddlyWiki Git repository, which SO desparately needs
to get merged in to the main branch, but you can rebase it to the
current version, that should work fine IMO.

/Andreas


[1]
https://tiddlywiki.com/prerelease/static/TiddlyServer%2520by%2520Arlen%2520Beiler.html

[2] https://github.com/Jermolene/TiddlyWiki5/tree/http-server

Reply all
Reply to author
Forward
0 new messages