javascript - upload file using xhr2 on IE 10 work only for text files -


i try use xhr2 upload files . work fine in ff , chrome when try on ie10 send text files no image no rar.

my script code

$("#uploader").click(function () { alert("upload"); var fileinput = document.getelementbyid("fileuploader"); var file = fileinput.files[0];  var fd = new formdata(); fd.append("files", file); alert(file.size); var xhr = new xmlhttprequest();  xhr.open("post", 'http://localhost:7128/filemanager/uplader.ashx'); xhr.setrequestheader("x-file-name", file.name); xhr.setrequestheader("x-file-size", file.size); xhr.setrequestheader("x-file-type", file.type); xhr.send(fd); 

});


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -