title: Ajax File Upload working in Chrome but not in Firefox
body: <p>Using XMLHttpRequest Level 2 I want to upload a File.
  I am using jQuery so I want to do it using jQuery in preference.</p>
  
  <p>So I wrote the following code (coffescript, but should be easily readable by anyone familiar with javascript)</p>
  
  <pre><code>fileToUpload = event.currentTarget.files[0]
  
  data = new FormData()
  data.append("uploadedfile", fileToUpload) 
  
  $.ajax({
      type: 'POST',
      url: url,
      data: data,
      contentType: false,
      processData: false,
      mimeType: 'multipart/form-data',
  })
  </code></pre>
  
  <p>Using that code, on the server side with PHP I do a `</p>
  
  <p>With Firefox 17.0.1 I get nothing. $_FILES is null, With Chromium 22.0 I get the the uploaded file (in a strange format, but at least something)</p>
  
  <pre><code>Array
  (
      [uploadedfile] =&gt; Array
          (
              [name] =&gt; filename.txt
              [type] =&gt; application/octet-stream
              [tmp_name] =&gt; /tmp/phpWwenhc
              [error] =&gt; 0
              [size] =&gt; 189
          )
  
  )
  </code></pre>
  
  <p>Does anyone knows if it is a Firefox bug? Is there a workaround? Am I doing something wrong?
  I searched for a similar problem, but all suggested answers that I found didn't work with me (were not for Firefox, were not using xhr level 2, etc)</p>
  
  <p>Thanks in advance.</p>
  
  <p><em><strong>PLEASE:</em></strong> I don't care about IE or older versions. Neither iframes solutions nor plugins. Just XmlHttpRequest Level 2. For those who didn't heard about it take a look at: <a href="https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/FormData/Using_FormData_Objects" rel="nofollow">https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/FormData/Using_FormData_Objects</a></p>