Okay... Works, after a fashion.

When I drag an image from a Chrome tab with the folder into the tiddler 
containing your macro, I get

<code>./Graphics%20Samples/</code>

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 :)

On Wednesday, April 5, 2023 at 8:39:47 AM UTC-4 Charlie Veniot wrote:

> 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.
>
> No server needed for that.
>
> On Wednesday, April 5, 2023 at 1:27:35 AM UTC-3 Donald Coates wrote:
>
>> 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.
>>
>> On Monday, April 3, 2023 at 9:19:52 PM UTC-4 Zaphod Beeblebrox wrote:
>>
>>> Looks great! :)
>>>
>>> Now... Work your sorcery and create a version to do the same thing, only 
>>> with locally-stored images!
>>>
>>> On Sunday, April 2, 2023 at 7:36:10 PM UTC-4 Charlie Veniot wrote:
>>>
>>>> Related TW script *in this post*, just below the video.
>>>>
>>>> https://youtu.be/NjE0MHsndE8
>>>>
>>>> ```
>>>> \define droppable-image-actions()
>>>> <$action-setfield $tiddler=<<actionTiddler>> $field="text" $value=""/>
>>>> <$action-setfield $tiddler=<<actionTiddler>> $field="_canonical_uri" 
>>>> $value={{{ [<actionTiddler>split[/]last[]addprefix[./Graphics%20Samples/]] 
>>>> }}}/>
>>>> <$action-setfield $tiddler=<<actionTiddler>> $field="type" $value={{{ 
>>>> [<actionTiddler>split[/]last[]split[.]last[]addprefix[image/]] }}}/>
>>>> <$action-createtiddler $basetitle={{{ [<actionTiddler>split[/]last[]] 
>>>> }}} $template=<<actionTiddler>>/>
>>>> <$action-deletetiddler $tiddler=<<actionTiddler>>/>
>>>> \end
>>>>
>>>> <$droppable actions=<<droppable-image-actions>>>
>>>> <div style="border:5px double blue;text-align:center;">
>>>> <p>Drop image here</p>
>>>> </div>
>>>> </$droppable>
>>>> ```
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/22a62fa6-5bba-4fb4-abf7-06fef95af9aen%40googlegroups.com.

Reply via email to