title: jQuery fileupload with drag&drop submits empty file input
body: <p>I'm using jQuery fileupload plugin, which works quite well when uploading files by clicking the file input and choosing via the browser's dialog.</p>
  
  <p>However when using drag &amp; drop, it seems to submit an empty file input</p>
  
  <pre><code>------WebKitFormBoundaryCA4VuYwsPr7h4ItR
  Content-Disposition: form-data; name="attachment"; filename=""
  Content-Type: application/octet-stream
  </code></pre>
  
  <p>although the data object inside the fileupload's add callback does have a file right before calling data.submit()</p>
  
  <pre><code>files: Array[1]
    0: File
      lastModifiedDate: Tue Mar 18 2014 13:29:07 GMT+0100 (CET)
      name: "17_1395143728_0.png"
      size: 13542
      tempID: 1
      type: "image/png"
      webkitRelativePath: ""
      __proto__: File
    length: 1
  </code></pre>
  
  <p>Does anyone have an idea why this happens?</p>
  
  <p>Edit: the code:</p>
  
  <pre><code>$(document).bind('drop.fileUpload', function (e) {
      if(jQuery(e.target).attr('id') !== 'dropZone'){
          return;
      }
  
      var fileInput = jQuery('#attachment');
      var files = e.originalEvent.dataTransfer.files;
  
      if (fileInput.length &amp;&amp; files.length) {
          jQuery('#dropZone').hide();
          fileInput.fileupload('add', {files: files});
  
          e.preventDefault();
      }
  });
  
  jQuery('.js_toggleFileupload').fileupload({
      autoUpload: true,
      forceIframeTransport: true,
      progressInterval: 50,
      url: '/xhr',
      add: function (e, data) {
  
          console.debug(data); // this is where the data object has files
  
          var jqXHR = data.submit().done(function (e, data) { // this is where an empty file input is submitted
              //stuff happens here
          }
      }
  }); 
  </code></pre>