title: jQuery AJAX 'multipart/form-data' Not Sending Data?
body: <p>I'm at a loss for why I can't get jQuery to pass upload data seeing as the AJAX object appears to be configured correctly, and the correct Content-Type/MIME-Type headers are being sent.</p>
  
  <p>I've tried two separate forms of request--one with a FormData object contained within a literal, and also just passing the FormData object directly.</p>
  
  <p>Unfortunately either way I can't get anything to pass, and both $_FILES and $_POST are empty arrays.</p>
  
  <p>The ideal request I wish to use is as follows:</p>
  
  <p><img src="https://i.stack.imgur.com/VxMTE.png" alt="enter image description here"></p>
  
  <p>Along with the following code:</p>
  
  <pre><code>var files = new FormData();
  
  $.each(context.prototype.fileData, function(i, obj) { files.append(i, obj.value.files[0]); });
  
  var request = { action: 'upload', id: response.obj.id, data: files };
  
  $.ajax({
  
      type        : 'POST',
      url         : context.controller,
      data        : request,
      processData : false,
      contentType : 'multipart/form-data',
      mimeType    : 'multipart/form-data',
  
      success     : function(r) {
          console.log(r);
          //if (errors != null) { } else context.close();
  
      },
  
      error       : function(r) { alert('jQuery Error'); }
  
  });
  </code></pre>
  
  <p>Once again the only response (looking at both the Network tab &amp; Console) when I try to export both $_FILES and $_POST is simply two empty arrays...</p>