-
Notifications
You must be signed in to change notification settings - Fork 289
-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post file/blob using multipart formdata ? #100
Comments
I try to POST files by that func, ------WebKitFormBoundary2gPDSneqBnpU2L4v ------WebKitFormBoundary2gPDSneqBnpU2L4v / |
Hey @justinjzs take 'Content-Type' out of the headers. The browser should add it automatically (including the boundary). |
@gusdaud @justinjzs @leplatrem |
Does anyone have a working example of this? |
@gusdaud's solution worked for me. This should be closed |
In the browser, if I do something like:
The request issued in the browser will have
Content-Type:"multipart/form-data; boundary=---------------------------<random-number>
and the body will be like:I would also work (from the browser) using blobs:
For our integration tests we're using isomorphic-fetch@2.2.1 and jsdom@9.4.1 and we can't get obtain the same behavior (content-type and body seem to remain empty).
I could not find any existing issue that was specific to multiparts (#30 is about FormData).
Is that something reasonably feasible ? Can we help ?
Thanks a lot!
The text was updated successfully, but these errors were encountered: