Am trying to upload a file using HTML5\'s DnD and File API. Am not to sure how to send form data to the server, i tried to send using XMLHttpRequest but was not successful.
Jeezzz!! Its works fine in IE, i was testing in Chrome v 28 since few days. In IE file gets uploaded fine. (tested multiple file uploads). So to make it work in Chrome i had to make few changes. * Mistakes made
In chrome While debugging client-side i found that var xhr = XMLHttpRequest() throws an error, "dom object constructor cannot be called as a function" So replaced it with
var xhr=new XMLHttpRequest(); and removed xhr.setRequestHeader("Content-type", "multipart/form-data"); (Not sure why but xhr.send() results in ispostback value to be false?? )
Comments are appreciated. Link to full code: http://programmingusingdotnet.blogspot.com/2013/08/aspnet-drag-and-drop-file-uploads-using.html