Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFeature: Allow requests without files #83
Comments
|
I agree with you, thought long over this situation, will try to do this week. |
|
Done, you can try in "dev" branch. |
|
In IE < 10 we have problems with XHR._send. In Flash.XHR._send we are falling back to parent _send if we haven't any real files to send. But our formData is not in htmlForm, so we're going to the single piece upload part and crashing on var bytes = Array.prototype.map.call(data, function(c){ return c.charCodeAt(0) & 0xff; });
xhr.send(new Uint8Array(bytes).buffer);cause IE < 9 doesn't have Array.map and Uint8Array For the workaround, I've extended toData meth in Flash.Form patch by simple checking existance of files in items and fallback to the parent if we haven't any. |
|
Oops, you're right, will correct soon. |
|
http://mailru.github.io/FileAPI/ — done. |
I have the following situation:
In an entity edit-form a user can select an image via <input type="file"/>. Additional data like firstname, lastname,... are sent within this request.
If the user doesn't want to change/set an image, I still want to send the other form-data.
Right now it stops before sending the request at the following line in FileAPI.core.js:
because data (file) is undefined because no file is specified.
I think it should be possible to send the data without any files because if it's not, I only have the following options left:
What do you think?
Lg
warappa