Hi!

On Sun, Aug 1, 2010 at 11:49 AM, Noah Kantrowitz <n...@coderanger.net> wrote:

> At the very least the encode/decode handler stuff seems like it could be 
> flushed out in a plugin. I'm not really sure how generally useful the 
> extension point would be beyond this rather contrived use case

Just for the record, that use case in the pre/post processing ticket
is not mine and I agree that it is a strange reason to implement this.
Disk space is cheap today.

I now see that my idea is different. I would only have a "preprocess"
function which could be used for:

- checking the file size and other validation (for example I could use
a plugin which would limit upload only to images) before you store the
file
- extract new files from a given file (uploading an archive, or
splitting a PDF into pages)
- generating thumbnail versions of images uploaded
- automatic LaTeX to PDF conversion

In preprocess phase processor could throw an exception and upload for
that file would be stopped. Also for new files generated in the
preprocess the whole chain would be run again. It would be also
possible to remove a file from a list of files to be attached (without
an error).

>  Also, if you want it in a release, are you volunteering to write it? ;-)

This is also an option. I have played a lot with mingling the Trac
internals but I would like first to discuss if the approach I have in
mind is suitable. So for me having a multi-file upload which is just
that file upload fields are automatically added is not enough (and as
you say it is messy). You still have to select one by one file you
want to upload.

So I would try to do this through HTML5 to allow drag&drop and
multi-file selection.

https://developer.mozilla.org/en/Using_files_from_web_applications

It requires only multiple="true" attribute. And HTML5.

If Gmail has it also Trac could have ti:

http://gmailblog.blogspot.com/2010/04/drag-and-drop-attachments-onto-messages.html

It works in Firefox 3.6, Chrome and Safari 5.

The only question is how to combine this with XHTML strict of Trac.
Moving Trac to HTML5 is probably a no go? We could stick to XHTML
markup and just change the doctype and use features which are already
available and supported (like multi-file upload).


Mitar

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to