Saq has a bunch more depth in the forum about how this integrates with savers, and publishers, and static file publishing and more, in a developer way that makes core code more flexible, maintainable and provides further building blocks … but as an end user, that has to essentially be taken on faith that Saq with Jeremy’s feedback is designing this in a good way.
Here is an attempt to write this up in a more user centric way.
The Story of File Uploads in TiddlyWiki
One of the pieces of TiddlyWiki’s enduring capabilities is the ability to operate in “single file” mode. But, when adding images, this bloats files to a very large size.
One can manually upload and manage files elsewhere and use the _canonical_uri
functionality to load them in TiddlyWiki, but this leads to a very poor user experience, effectively having to manage content in multiple places, and depending on how you sync or host TiddlyWiki vs where you put files, having to manage file sync in multiple spots as well.
With the file upload plugin, the goal is to have a unified and integrated way to deal with file uploads through TW itself, while inserting them with _canonical_uri
.
Initially, fully supported files will be images and PDFs. Arbitrary file types might be supported in different ways in the future.
===
As a user, I open up my TW which has the File Uploads Plugin installed and enabled, along with the Webnative IPFS Saver on Fission.
I select an “Upload Images” button and select one or more images and hit upload.
Once the images are uploaded, I get a link to each of the tiddlers created, which are named the same as the file name minus the file extension.
In the settings, I have various configurations:
- Default path. This is a relative path to the TW HTML file, and defaults to empty (files will be uploaded to the same directory as the TW file; one might enter in a directory name like “assets” or “images”)
- Default Tag to apply to uploaded images, defaults to “Image”
- Default thumbnail size, eg set to 800px wide or none, and the _canonical_uri is the same as source (otherwise a
original_image
field is added that points at the original)