Overwrite upload /drag and drop functionality in TW?

Hello,

If I wanted to overwrite how TW saves media files, example:

What should I search for, to do that? : (plugin? or custom code? or macro? )

What side-effect should I worry about if :

  • if its .png .mp3. , .mov , .mp4 (example in png maybe TW creates thumbnail,etc)

Example mp3:
http://wwwhww.news/u/cwSNkeLNXf#A-Room-With-A-View-by-E.M.Forster

Looks like there is an official plugin:

External Attachments Plugin

Just not sure how to use it or if it will do what I need it to do.

Lucas

Some of the answer will depend on whether you’re using TW under node, or standalone.

Each solution has it’s own “gotcha”, alas.

For instance, the EFP needs to run under TiddlyDesktop. And practically, your file needs to be in a subdirectory files/ (because TD will only serve up static files from under files/)

One approach I came up with is to use the operating system’s tools to create a tiddler with a list of files to “import”, and then create the _canonical_uri tiddlers en masse.

For standalone wikis, I believe @buggyj 's web clipper had the ability to produce _canonical_uri tiddlers that are created when clipped from a browser page used as a file manager (i.e. NOT the local file manager).

The file uploads plugin is also intended to help do this.


The FileUploads plugin attempts to address this needs and is extensible via uploader modules to support different server backends to which to upload the files:

If you need any assistance with writing an uploader module please feel free to make a post in the developer category of this forum. This is a dummy uploader module that is a good starting point for write a new uploader.

Note that lszyba1 wants to upload 70mb of data. I suspect TW would crash before the File Uploads plugin had a chance to process it.

What may be important here is are they uploaded at the one time and that they are seperate files or large files. A single file as in the example of 70mb may be fine, it needs to be evaluated. Importing smaller files first until confident would make sense.

Uploading particularly large files, even with the File Uploads plugin in use, such as mp3 and video files should really be questioned, except in special cases, because there are dedicated services designed to serve such content to multiple users and offloads serving to these services, for example Youtube.

  • You then link to or embed the external content in your tiddlywiki
  • Your server need not incur the bandwidth
  • Typical the user will have a better experience
  • Your server can be far simpler, cheaper and easier to maintain, if you offload the intensive content delivery.

That is definitely good point, but I think its technical point but not sure if good business option. I think from my perspective there are two threads to consider:
a) As a content writer you don’t know what might be a hit, so if you want to upload 70mb audiobook, and then do that it for 25 more books, TW would not like that. Hence at minimum if your TW approaches let say 10mb in size, its time to offload to _canonical_uri. (I would not be happy if loading the site used 100mb of my cell data just to load)

b) the other factor you need to consider is if you working inside youtube(or other syndicate), then google will prioritize content on their network first. So if one searches for my beautifully spoken A-Room-With-A-View-by-E.M.Forster audiobook, google will show the youtube version, rather then my site that embeds it; and therefore you will miss out on Charles Dickens Christmas carol audiobook. :slight_smile:

Doing more research I was actually thinking on offloading the content to s3 compatible storage vendor.

Thanks
Lucas