0

I have a page where we upload files. I'm using FileUpload.js file for upload feature. I also a box for drag and drop for the files, everything works great in Chrome, Firefox and Edge but in IE 11, when I try to drag and drop the file in the box, I get this error:

Unable to get property 'Value' of undefined or null reference

I'm calling fileupload function like this

     $('#fileupload').fileupload({
                  maxChunkSize: 10000000,
                  maxFileSize: 2147483648,
                  autoUpload: true,
                  dropZone: $('#dragAndDropHandler')
              });

The HTML code is below -

 <div id="fileupload">
      <div class="fileupload-buttonbar">
        <label class="fileinput-button" style="background-color:#dddddd" >
          <span class="addfile" style="font-size:larger;font-weight:300;" >Add files...</span>
          <input id="file" type="file" name="files[]" multiple onchange="setButtons(this)" />
        </label>
          <label style="color:black">CTRL + Click to select multiple files</label>

      </div>
      <div class="fileupload-content" >
          <div id="dragAndDropHandler"><span>Drag &amp; Drop Files Here</span></div>
        <table class="files"></table>
        <div class="fileupload-progressbar"></div>
      </div>
    </div>

I tried to pass the datatype: 'application/json' and dataType: 'text/plain' it didn't work.

I tried to implement this answer but that didn't work.

halfer
  • 19,824
  • 17
  • 99
  • 186
ISHIDA
  • 4,700
  • 2
  • 16
  • 30
  • IE has a security zone setting for "Include local directory path when uploading files to a server". File>Properties will tell you which IE security zone a domain is mapped to (expected Internet). "Undefined or null reference" errors mean that the Object you are referencing is Undefined or null. Use the browsers' dev tool debugging tab to inspect the value of objects in the line of script that raises the error. f12>Debugging tab, select "Break on all exceptions" from the dropdown (looks like a blue stop sign). PIN the dev tool to your browser... (It must be loaded while debugging). – Rob Parsons Aug 09 '17 at 22:14
  • I started debugging entire fileupload.js file, When I drag and drop the file in IE11, httpcontext in asp.net is not getting any file. contenttype is `application/octect-stream`. I clearly don't know why when I drag and drop the file in IE11 it is not sending the file. – ISHIDA Aug 09 '17 at 22:21

0 Answers0