File Uploads - NodeJS Backend Wishlist

Thanks @sortega for supporting the plugin and funding the NodeJS backend.

Please use this thread to share some ideas and wishlist ideas items of how you would like the NodeJS version to work / what features you’d like to see that are specific to NodeJS.

I looked around a bit, and because of the built in files route, I’m guessing that uploading into the “files” directory by default might be one feature.

I am very pressed for time these days but in case it helps in terms of ideas, this is what my current working prototype for my use case looks like:

  • saves inside the “files” directory
  • extends the server so the “files” directory accepts PUT requests to save files
    • this means that a simple PUT uploader (that also works on WebDAV) also works with nodejs with this tweak.
  • optionally ensures that the canonical uri created are unique for a given wiki
  • optionally uses a config tiddler with filters to determine the path to save a file, using the same logic as customising tiddler file naming. So you can save in sub-directories inside the “files” directory.

The last two optional features are controlled by config settings and are handled by the uploader.

That would be perfect for my TiddlyWiki setup.

For those interested in what using the FileUploads plugin with node.js might be like, there is an experimental plugin in my library that adds support to the node.js server for the PUT uploader.

It is a quick experiment and not implemented how a properly supported node.js backend would be, but it might be helpful in terms of understanding the user experience and features that we want.

1 Like

Had to share that even with that ‘‘very experimental’’ flag, this subplugin is seriously worth checking out. If you’re maintaining NodeJS-based wikis, it’s magic!

Frankly, importing photos from my phone and watching them seamlessly become lightweight tiddlers (through a _canonical_uri field pointing to a local path) is an absolute delight all over again.

Quick heads-up for version 0.1.1: the TiddlyWiki server needs to be launched right from your wiki’s directory in order for the files/ subpath to function correctly. As in: tiddlywiki . --listen port=5555.

1 Like

Life has gotten in the way and the work has been on pause, but I have a close to ready optional image optimization/resizing implementation as well that will integrate smoothly with the File Uploads plugin. Hopefully I can get it out the door by the end of summer.

2 Likes