1

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");
    }
  });
}
Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
Jegan Baskaran
  • 337
  • 2
  • 16
  • I suggest you to directly try to run the example in IE without using SharePoint to check whether it is running without any issue or generates the same error. I try to run the example from link below which is working fine with IE11. Ref: http://lampspw.wallonie.be/dgo4/tinymvc/myfiles/plugins/multifile-2.2.1/docs.html you can also confirm with the jquery.multifile support whether they are aware about this issue or not may help to narrow down this issue. – Deepak-MSFT Aug 05 '19 at 14:43
  • I think the issue is only with IE 11 + SharePoint , not with jquery multi-file. – Jegan Baskaran Aug 06 '19 at 10:41
  • We are not aware about your SharePoint related setup. It is better if you test what I had suggested you before may help us to narrow down the issue. Let us know about the testing results, we will try to provide further suggestions for it. Thanks for your understanding. – Deepak-MSFT Aug 07 '19 at 07:27

0 Answers0