Search code examples
jqueryuploadify

How to add files to uploadify from code?


I like uploadify but I need to incorporate a drag'n drop module for the browsers that support this feature.

Right now the only way to select files is via the browser dialog window. I'd like to have something like:

$("mySelector").uploadify("addFile",{src:...; name:...; etc:...});

This would allow me to get the paths of the files dropped into the browser add them to the upload queue. Is there any way I could achieve this?


Solution

  • Well after a few months of research it turns out that the file implementation of flash is incompatible with the file implementation of HTML5 that starts to be supported by more and more browsers.

    In other words, for security reasons, there is not bridge for sending file objects between the languages.

    One research idea would be to implement such a bridge, but that is a discussion for another time. Uploadify 2.x does not support this feature.