How do I browse to upload a file using Dojo? See the code below:
dojox.io.xhrMultiPart({
url: "http://localhost:8080/myWebService",
handleAs: "xml",
form: dojo.byId("myForm"),
load: function(data){ processRequest(data);},
error: function(error){ processError(error); },
backButton: function() {
},
mimetype: "text/xml"
});
Now which code do I have to append to the above code to upload a file?
I use
dojox.form.Uploader, which will enable you the “Browse” functionality.I use
dojo.io.iframe.sendto upload file.Then on the submit button of the form, I use following function to post,