new very simple feature request: single file instant upload (programmatic)
I noticed in your FAQ you said: Can I trigger file dialog programmatically?
It depends on the runtime, but the short answer is - no, since it is not possible to achieve consistent behavior across the runtimes
However, many people (like me) have a need to use plupload for all it's other benefits, ajax upload with progress bar, etc and only use it with HTML5, I don't use plugins like flash or silverlight anyway.
Would it be a lot of trouble to add this feature to have a function that, for html5 only, allows me to click a simple "Upload" button, allows me to select a single file, then as soon as it is selected begins upload immediately?
In my scenario users want to just click upload, select the file, and watch my progress bar upload it into my app and then view all the files they uploaded before, so I don't need plupload to do much, only to allow me to actually do the most basic thing - upload a single file!
All this file queue multiple file stuff just gets in the way - in my app they have to tag each file with various things, so I only want to allow them to select one file at a time.
I am trying to hack something like this in but it would really be a lot more user friendly if you had the option to programatically trigger the upload dialog and then the upload itself.
I know it is possible to do this because plupload is doing it internally - can you just expose that API please?
Would be much appreciated.
Thanks!
Everything except programmatic triggering of file dialog is exposed, you just need to use Core API, instead of widgets, that are only implementations of it. To start the upload automatically for example after file selection, you should simply call uploader.start() in the listener of FilesAdded event. Etc.
Core API Reference available here.
Ability to trigger file dialog is inconsistent even across the HTML5, check this recent thread for example. But agree it should become available sooner or later.
Right, but I need programmatic triggering of the file dialog, because for example I have a record and the file dialog there and I need to save the record first that I'm attaching the file to so if someone hits upload file I want it to auto-save other stuff first before proceeding, and in other cases I need to do validation, etc prior to popping that up. I tried creating another button and hiding this one and then using jquery to 'click' the hidden button but that doesn't work.
I guess I could look in the source could for how you launch the dialog and just do that, but I know I am not the only one needing this so I figured I'd mention this.
Thanks!
On Sat, Jul 13, 2013 at 1:57 AM, Davit Barbakadze [email protected]:
Everything except programmatic triggering of file dialog is exposed, you just need to use Core APIhttps://github.com/moxiecode/plupload#structure, instead of widgets, that are only implementations of it. To start the upload for example automatically after file selection, you should simply call uploader.start() in the listener of FilesAdded event. Etc.
Core API Reference available herehttps://github.com/moxiecode/plupload/wiki/API .
— Reply to this email directly or view it on GitHubhttps://github.com/moxiecode/plupload/issues/832#issuecomment-20915312 .
By programmatic triggering we meant triggering of file dialog. If user actually clicks a button, of course browse dialog will appear. In all runtimes.