Changing Filename In Blobbuilder To Be Passed As Formdata On Xhr
I'm currently trying to upload an ArrayBuffer to a server (which i can't change) that expects the file i'm uploading on a multipart/form-data format. The server extracts from the C
Solution 1:
Just solved it myself, thanks to a Chromium issue pointing me to the answer on w3c standard draft XMLHttpRequest. Basically i should change:
fdata.append('file', bb.getBlob("application/octet-stream"));
to:
fdata.append('file', bb.getBlob("application/octet-stream"), obj.filename);
And it gives the desired result.
Post a Comment for "Changing Filename In Blobbuilder To Be Passed As Formdata On Xhr"