title: Upload a binary file using pure JavaScript
body: <p>I'm working on a Chrome app that uses the HTML5 Filesystem API, and allows users to import and sync files.  One issue I'm having is that if the user tries to sync image files, the files get corrupted during the upload process to the server.  I'm assuming it's because they're binary.</p>
  
  <p>For uploading, I opted just to make an Ajax POST request (using MooTools) and then put the file contents as the body of the request.  I told MooTools to turn off urlEncoding and set the charset to "x-user-defined" (not sure if that's necessary, I just saw it on some websites).</p>
  
  <p>Given that Chrome doesn't have support for xhr.sendAsBinary, does anyone have any sample code that would allow me to send binary files via Ajax?</p>