4 ms·
Agreed. I'm working on an extension that allows pasting of e.g. screenshots. It requires two components: a change to the wiki itself to trap the paste event an
by rpdillon 4y ago
Agreed. I'm working on an extension that allows pasting of e.g. screenshots. It requires two components: a change to the wiki itself to trap the paste event and detect an image and call the backend to store it, and a server that can accept a POST that stores the images alongside the wiki. I needed the backend to support seamless saving via WebDAV anyway, so this was a small update to that code. I've finished the backend portion, but I'm still working on the frontend; I want it work in both the normal tiddler editor as well as my log-based extension.
I'm excited to get it working, but it does break the "all in one HTML file" aspect. I'm OK with that: I can archive the directory of images alongside the wiki, but it might not be for everyone.
- Datagenerator 4y agoGood to hear, please keep the number of possibilities high by storing the images just as files. Do you have public code to test or follow for interested TW5 users? Thanks!
- rpdillon 4y agoYes, the images are just files in a directory called "s" (for static) that sits alongside my wikis. I've describe this system a few times, but this is the first time I've gotten some interested replies. I have a long weekend this weekend; I'll take a stab at cranking through the frontend code and making it available publicly.
- saqimtiaz 4y agoYou might find the FileUploads plugin of interest. Every time it detects an image in TiddlyWiki that meets a specified filter, the image is uploaded to a storage backend. Demo: https://talk.tiddlywiki.org/t/image-imports-in-tw-5-2-0-and-fileuploads-plugin/122 https://talk.tiddlywiki.org/t/image-imports-in-tw-5-2-0-and-... The choice of backend is pluggable via Uploader modules. There is already an experimental PUT Uploader that is WebDAV compatible. The version currently published is very simple though there is an advanced PUT uploader that I need to polish up and publish that allows for things like creating directory structures if needed when uploading an image and sanitizing tiddler titles to ensure that they are valid file names. Installation is via a plugin library: https://saqimtiaz.github.io/SQPL/ https://saqimtiaz.github.io/SQPL/ Discussion: https://talk.tiddlywiki.org/c/plugins/file-uploads/8 https://talk.tiddlywiki.org/c/plugins/file-uploads/8 If you are working with TiddlyWiki and WebDAV, you might find this writeup of interest as well: https://saqimtiaz.github.io/sq-tw/webdav/ https://saqimtiaz.github.io/sq-tw/webdav/
- rpdillon 4y agoThis is extremely useful info, thanks so much for posting it! I was unaware of the FileUploads plugin, and I've been trying to piggyback as much as possible on TW's builtin WebDAV support so Notedeck remains lightweight. If I could update my existing backend code (it's a single, 320-line Python file at the moment) to support some additional WebDAV calls so it works with FileUploads, I would consider that a complete solution.