When uploading a file using jquery.multifile, i'm getting error in IE 11, that is the files[0] is undefined, hence uploading is failed, when i checked the same in chrome it works, as it supports this files attribute. so anyone has a solution for this IE issue?
I want a solution to upload the files in IE 11 using jquery.multifile.
IE 11 Error : showing File(0) as undefined
<div id="attach" class="input-group">
<input id="FileUpload" name="upload" type="file" multiple/>
</div>
function Upload(ID) {
var fileCollectionEndpoint = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/GetByTitle('mylist')/items(" + ID + ")";
$.ajax({
url: fileCollectionEndpoint,
type: "GET",
headers: {
"accept": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function(data) {
$("#attach [name=upload]").each(function() {
if ($(this)[0].files[0]) {
if (($(this)[0].files[0].size > 0) && ($(this)[0].files[0].size < 10485760)) {
touploadfile($(this)[0].files[0], ID);
}
}
});
},
error: function(data) {
alert("Error at uploading");
}
});
}