Skip to content
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

can't post multipart/form-data #147

Open
zhouchengcom opened this issue Aug 23, 2016 · 4 comments
Open

can't post multipart/form-data #147

zhouchengcom opened this issue Aug 23, 2016 · 4 comments

Comments

@zhouchengcom
Copy link

No description provided.

@zhouchengcom zhouchengcom changed the title can't post can't post multipart/form-data Aug 23, 2016
@zhouchengcom
Copy link
Author

zhouchengcom commented Aug 23, 2016

@connect( props => (
{
newProject: data => ( {
newProjectRespond: {
url: '/new',
method: 'POST',
body: data,
force: true,
headers: {
'Content-Type': 'multipart/form-data'}
} })}) )

and then
‘const data = new FormData()
this.props.newProject( data )’
but post data miss boundary=
just like this
content-type:multipart/form-data

@ryanbrainard
Copy link
Contributor

This is likely an issue with your fetch library. Can you try it directly without refetch and see if it works?

@zhouchengcom
Copy link
Author

raw fetch is ok I found the right way is set
headers: {
'Content-Type': null
}
:)

@ryanbrainard
Copy link
Contributor

Ah, makes sense (kind of). Since this is still probably fetch library dependent, I'm hesitant to document it, but perhaps a note in the docs would help someone else not run into this same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants