Mark:

I am thinking about the same approach (I think) as you did.
Basically, the FileDrop capture the path(s) of target file(s) or folder
(s), and figure out a destination folder, which is user pre-defined
pattern (such as ./attachment/[[tag]]/[[tiddler]] with illegal
characters removed).  It then handed such information outside to a
shell script level program to execute.  This is to work around the
security issue. (Bear with me if I don't know what I am saying).  If
the same mechanism can be used to monitor the TW so that if all
tiddlers related to one attachment are deleted, the user will be
prompted to delete those files.

I was hoping such hybrid approach (not elegant) might work.

(Go back to you last posting on Feb 9, 10:56 pm)  Could you elaborate
a little bit more how is your modification work?  and what's the end
result? Thanks!

Duke

On Feb 9, 1:34 pm, "Mark S." <[email protected]> wrote:
> Hi Eric,
>
> Is there an easy way to set FileDropPluginConfig, so that it always
> links and never embeds -- even for text files? Basically, I just want
> to drag and drop links to files (preferably with a relative path so
> that it will work anywhere.) I guess having intelligent drag-and-drop
> links (e.g. formatted as links for files but as images for images)
> would be cool, but even just having not to type the path by hand would
> be a good start.
>
> The concept of embedding files is really cool, but the only benefit
> over file linking is that its a bit simpler to carry everything as one
> file on your thumbdrive. Without a synchronization tool (e.g. rsync)
> it might be a bit tedious to carry along a set of files rather than
> one file.
>
> So .... thinking out loud.  What about dragging and dropping a file,
> which creates a batch file script in the tiddler? Then the actual
> human being could copy the tiddler out to a bat file (or sh, depending
> on system), and run the code which would set up directories, copy the
> files, etc. This would bypass the sensible security limitations on
> javascript, handing-off the responsibility to a human who, hopefully,
> knows that its OK to copy file "B" to new location "Z".
>
> -- Mark
>
> On Feb 9, 8:57 am, Eric Shulman <[email protected]> wrote:
>
> > > moderate sized image and got a new tiddler with the following info:
>
> > > plot2.jpg  type=image/jpeg, size=128810 bytes, encoded=174431 bytes
>
> > > But every time when I try to open that tiddler, there will be a long
> > > delay and FF3 will report a unresponsive script.  The tiddler will
> > > eventually open and the full size image show in the tiddler.  But this
> > > is not so usable with even larger size image.
>
> > > Did I missed anything?  I read some people also have issues with
> > > several MB video file.  So I guess the embedding process slow it
> > > down.
>
> > In general, photos and other media files are, for practical use, too
> > big to embed as base64-encoded content, primarily due to performance
> > issues.  Encoded images are best used for relatively small graphics,
> > such as icons, logos, and background textures.
>
> > > I wonder if it is possible to NOT embedded the file into a tiddler but
>
> > AttachFilePlugin supports *three* different ways to attach a file:
> >   * embedded base64-encoded data
> >   * a local file/path reference
> >   * a URL
>
> > If there is no embedded data in the attachment tiddler, then the local
> > path/file is used (if any).  If there is no local file information (or
> > the file does not actually exist), then the attachment falls back to
> > using a remote URL (if specified).
>
> > There is a Configuration section in FileDropPluginConfig that you can
> > use to control whether or not *encoded* data will be included in the
> > attachment tiddler.
>
> > > Since the main headache of using external file are maintaining the
> > > relative link and file storage.
>
> > Using TiddlyWiki to automatically copy/create new directories and
> > files in your filesystem is not a good idea: file and directory I/O
> > functions from javascript are subject to security restrictions
> > (especially for writing *binary* files), and there are significant
> > browser-specific and OS-specific limitations that make reliable
> > implementation extremely difficult.  At best, it's a large, complex
> > chunk of code... at worst, there's just too many ways that the
> > functions can fail, with the potential for filesystem corruption
> > (badly formed directories/files) or loss of data (from deleting the
> > wrong file).
>
> > However, even without automatic manipulation of the external
> > filesystem, you can still use AttachFilePlugin/FileDropPlugin much as
> > you have described... except that you will still have to manually
> > create and maintain the external folder of images, rather than having
> > the plugin do it for you.
>
> > enjoy,
> > -e
> > Eric Shulman
> > TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to