I want to create a Dojo Uploader button.
When the user finishes selecting a file, I want to upload the file to the server immediately (don't wait for a submit click).
Here's my code:
In the body of the HTML doc:
<input name="restoreFile" multiple="false" type="file" id="restoreBtn" data-dojo-type="dojox/form/Uploader" data-dojo-props='label: "Upload", url: "<s:url action="restore-backup" />", uploadOnSelect: "true"' /> <div id="fileList" data-dojo-type="dojox/form/uploader/FileList" data-dojo-props='uploaderId: "restoreBtn"'></div>
I tried putting both of these tags into a form tag, but there was no change in behavior.
When I click on the uploader, I see the file picker. When I select the file and click "Open," the FileList shows the selected file, but nothing is sent to the server.
I tried requiring all three of the uploader plugins, HTML5 (isn't supported in IE, but doesn't work as desired in Chrome either), IFrame, and Flash.
An I misunderstanding how uploadOnSelect is supposed to work? Why is the uploader not uploading the file after it is selected?