title: Ajax post array: Uncaught TypeError: Illegal invocation
body: <p>I'm trying to send an json-array to the upload.php file. The following error popped up: </p>
  
  <blockquote>
    <p>Uncaught TypeError: Illegal invocation</p>
  </blockquote>
  
  <p>I'v also tried to add <code>processData: false</code> but then there's is nothing posted to upload.php.</p>
  
  <p>My code: <a href="http://jsfiddle.net/r0330537/86yqj/" rel="nofollow">http://jsfiddle.net/r0330537/86yqj/</a></p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="dropzone" class="dropzone"&gt;
      Drop uw bestanden en/of zip hier
  &lt;/div&gt;
  </code></pre>
  
  <p>JQUERY</p>
  
  <pre><code>$( document ).ready( function() {
      ...
      function drop(event) {
          //console.log( "drop", event );
          event.stopPropagation();
          event.preventDefault();
          $(this).removeClass("dragging");
  
          var data = event.dataTransfer,
              fileList = data.files,
              file = new Array();
  
          for(i = 0; i &lt; fileList.length; i++) {
              file.push( fileList[i] );
          }
  
          console.log( file );
          // ajax
          $.ajax({    
              type : "POST",
              url : "ajax/upload.php",
              dataType : "json",
              data : { "file": file },
              succes : function(data) {
                  console.log(data);
              }
          });
      }
  
      var dropzone = $( ".dropzone" ).get(0);
      ...
      dropzone.addEventListener( "drop", drop, false );
  });
  </code></pre>