The aim of this gist is to fix the following informative post about uploading via XHR.
The first part is the HTML. First of all, you really don't need JavaScript to upload a file but you do need a proper form. Secondly, inputs in a form shouild have a name, because the name is what the server will receive: not IDs, names!
Following the fixed form part.