On Firefox 3.6 and Chrome, using xhr.send(file) just puts the raw contents into the body of the request and it is not a true multipart/form-data upload.
Tried doing
The key thing is using sendAsBinary(body) istead of send(body). See the last comment on the page you linked!