Issue with dojox.form.Uploader in dojo 1.6

99 views Asked by At

I've tried every variant, programmatic and declarative with no success.

I'm having troubles using the dojox.form.Uploader, is seems to work just fine in version 1.10 but in 1.6 doesn't. When I select the file, nothing happens, even if the uploadOnSelect option is set as true.

I've no intention to upgrade to 1.10 due to company policies and because the main application is in 1.6, so, if I use 1.10 it causes compatibility issues. I just want to be able to upload a file by ajax (HTML5).

Here is an example of how I'm creating the uploader:

btn_upload_csv[i] = new dojox.form.Uploader({label:"Programmatic Uploader", multiple:true, uploadOnSelect:true, url:"UploadFile.php"});

If it is no possible to use a module from a higher version, what options do I have?

Here is an example of what I've so far https://jsfiddle.net/0exeLpmn/2/

1

There are 1 answers

0
Flavio On

It just needed to startup the widget like:

btn_uploader.startup();

Here is an example: https://jsfiddle.net/0exeLpmn/3/

(to check if this works open your browser's console and see the post request been made)

I can't believe this isn't in the documentation.