title: HTML5 File API readAsBinaryString reads files as much larger, different than files on disk
body: <p>Full code at <a href="https://gist.github.com/992562" rel="noreferrer">https://gist.github.com/992562</a>. </p>
  
  <p>I am using HTML File API and drag/drop to upload files via XHR post to a PHP script. Procedurally, everything seems to be working OK, however when I try to open the uploaded files, any non-text file is much larger than the source file, and won't open. It's clearly not the same data as was on the source disk. However, text files are exactly the same and open just fine.</p>
  
  <p>Some examples on a 3-file drag/drop upload:
  file 1: text/XML: on disk 13 KB, uploaded 13 KB, works perfectly
  file 2: image/PNG: on disk 14 KB, uploaded 18 KB, won't open
  file 3: application/XLSX: on disk 12 KB, uploaded 14 KB, won't open</p>
  
  <p>It all boils down to this (after xhr headers are setup, file object is ready, etc):</p>
  
  <pre><code>  var reader = new FileReader();
    reader.onload = function(evt) {
      xhr.send(evt.target.result)
    }
    reader.readAsBinaryString(f);
  </code></pre>
  
  <p>returning large, bad data. Is there anything clearly wrong with it?</p>