title: FormData object always empty
body: <p>I am trying to create form data to send within a post request (to a PHP script) with FormData.</p>
  
  <p>However, the FormData object is always empty:</p>
  
  <pre><code>var oReq = new XMLHttpRequest();
  var url = "http://www.test.com/test.php";
  oReq.open("POST", url, true);
  oReq.setRequestHeader("Content-Type","multipart/form-data");
  var myFormData = new FormData();
  myFormData.append("formType","PDF");
  myFormData.append("pdf", pdf.output(),"thisPDF.pdf");
  oReq.send(myFormData);
  </code></pre>
  
  <p>the 'pdf' variable is a jsPDF object (I've checked that it is a valid object and I have tried to remove that line and only have the "test" form data element sent.  Yet, myFormData is always an empty object.  Hoping I'm just missing something simple here.</p>
  
  <p>In addition, when I try to check for the existence of the form elements in the PHP script, it shows no $_POST and no $_FILE elements at all.</p>
  
  <p>ADDITIONAL INFO:</p>
  
  <p>When I try this code:</p>
  
  <pre><code>var oReq = new XMLHttpRequest();
  var url = "http://www.test.com/test.php";
  oReq.open("POST", url, true);
  oReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
  var myFormData = new FormData();
  myFormData.append("formType","PDF");
  alert(JSON.stringify(myFormData));
  oReq.send(myFormData);
  </code></pre>
  
  <p>I can then access the "formType" $_POST variable in the php script.  But if I add in the File append statement to the myFormData object (and keep the same 'Content-Type', the PHP script errors returning a "not allowed access" error.</p>
  
  <p>However, the $_POST is set according to isset($_POST) in both cases and with the file inserted the $_FILE variable is set according to isset($_FILE). </p>