You have to have some sort of server running to upload files. When you drag an image into a single file wiki it is not uploading it, it is converting it to binary(?), not actually uploading the image. The nodejs version is running on server software that can upload files. I use filestash via docker for a very lightweight server to upload images that I then use this code to create link to by dragging the link. It is such a time saver.
If I view a folder on my computer via my web browser, I can drag the links for image files from that directory listing in my web browser to that droppable zone I created and have displaying in my local TiddlyWiki.
When I drag an image from a Chrome tab with the folder into the tiddler containing your macro, I get
./Graphics%20Samples/
before the filename and no image shows in the Tiddler (this is NOT part of the file path to the image).
But once I delete the above addition, all works fine
It still adds the â%20â in place of spaces in the filename, but they can safely be replaced by spaces (if I could write filters, I could probably add one to automatically convert them back to spaces, butâŚ)
In any event, this will still be quite useful - Thank You, Charlie
Using the droppable widget, we have no way (none documented that I know of) of knowing the URL of the thing being dropped.
We can get the filename, though.
The whole point of using the droppable widget is to drop into your TiddlyWiki just enough info about images from your storage location.to create an image tiddler with a canonical uri link.
The info for the canonical uri via drop to the droppable widget is incomplete. You have to provide the missing bit (the standard bit for all of your images) that will be added as a prefix to the image name.
If the intent is to create image tiddlers with canonical uriâs from all possible sources on the web, this is not the right approach.
The attached json file has one tiddler. That tiddler has two droppable zones and each using a different macro.
The first droppable zone is for your images, all stored under one root image folder, that folder being in the same domain as your TiddlyWiki instance. You have to modify the related macro with the hard-coded bit of a relative path to your images.
The second droppable zone is for any image available via a server. The Tiddler titles will be just the file names, the _canonical_uri values will be the full URL to the files.
In all cases, the droppable zones expect URL links to the images. They are not meant for dropping actual image files.
I wonder if this could become something that makes its way into the core TiddlyWiki.
Imagine if there was a configuration option under Settings in $:/ControlPanel called âImage import behaviorâ and the options were âEmbed image in TiddlyWikiâ and âExternally link image with canonical url fieldâ.
If the default behavior was âEmbedâŚâ then it wouldnât break anything for those accustomed to the embedding.
I am all for reducing the number of mouse clicks to get stuff done. Part of my quest to reduce the spread of mouse-clicky-induced tendinitis oâ the finger knuckle.
We are going to have a generation of folk who cannot finger-poke significant othersâ foreheads, when said significant others honestly deserve a straight finger-poke to the foreheadâŚ
Me being a huge fan of minimalism (like Tiny Core Linux), Iâm a big fan of a small (lean and mean) core if it can be paired with an excellent repository and easy package (plugin) management.
Looking at what I did with this handy little gadget, there isnât much to it, so it would be pretty cool to see that in the core.
I might try and pretty that up and turn into a sidebar tab tiddler that can also function well as a transcluded thingy.
I had put something together a fair while back that might be worth taking a look at. I was using it to embed _canonical_uri tiddlers to PDFs so I pulled out the mime-type selector for flexibility and made a â$:/language/Docs/Types/application/pdfâ along the same lines as the others to add that option to the list (I am not sure why it is not a default option). Iâve always wanted to make things a little more automated by reading the extension but never bothed since 99% of this things I was embedding were PDFs. It has the bonus feature of tagging the created tiddler with the title of whatever tiddler contains the macro.