Javascript/HTML5 file API reading sequential files into multipart form data
问题 I'm using the HTML5 File API to assemble multipart form data for submission by XHR to a web service. I have the whole thing working in FF, which has a nice convenient getAsBinary() method included in their implementation of the file API. This was a pretty sweet deal. It basically went: var const; // constructor const += headers; const += field_data; for(var i = 0; i < files.length; i++) { const += files[i].getAsBinary(); } sendData(const); Worked like a charm. To get it working in Chrome,