drag and drop files and get a link and preview in TW5

90 views
Skip to first unread message

stefan infp

unread,
Sep 26, 2015, 4:20:21 AM9/26/15
to TiddlyWiki
I would like to drag and drop images or other file types into TW5 and automatically get the link to these external files (locally stored) in separate tiddlers. And the preview for images, pdfs,... how can i do that?

Eric Shulman

unread,
Sep 26, 2015, 7:08:57 AM9/26/15
to TiddlyWiki
Unfortunately, this is no longer allowed by most browsers. While drag and drop provides the content of the file, it no longer provides the source location information, as this could be used in exploits to 'probe' the local directory structure.

-e

Tobias Beer

unread,
Sep 26, 2015, 12:19:40 PM9/26/15
to tiddl...@googlegroups.com
Hi Stefan,

Perhaps TiddlyDesktop could at some point provide an enhanced DnD wizard,
essentially a custom browser add-on / interface.

Best wishes,

— tb

Jeremy Ruston

unread,
Sep 26, 2015, 12:25:46 PM9/26/15
to TiddlyWiki
Hi Tobias

Perhaps TiddlyDesktop could at some point provide an enhanced DnD wizard,
essentially a custom browser add-on / intferface.

That's what I thought, but it turns out to be quite hard to intercept and augment the drag and drop events.

But there is an interesting workaround that we might also explore more: in most browsers, you can open a browser window to show you a directory listing, eg:

file://localhost/Users/jeremy/

In most browsers, dragging one of those entries into TiddlyWiki will create a tiddler containing the URL of the file. With a bit of work, we could turn that into a tiddler with the URL in the _canonical_uri field.

Best wishes

Jeremy


 

Best wishes,

— tb

--
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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/ef0ad9c2-3a10-407d-b28e-c97876e1d7a4%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Tobias Beer

unread,
Sep 27, 2015, 1:19:20 PM9/27/15
to TiddlyWiki, jeremy...@gmail.com
Hi Jeremy,
 
In most browsers, dragging one of those entries into TiddlyWiki will create a tiddler containing the URL of the file. With a bit of work, we could turn that into a tiddler with the URL in the _canonical_uri field.

Unfortunately this won't work from an embedded iframe, though.

Best wishes,

— tb 
Reply all
Reply to author
Forward
0 new messages