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

Properties never on req.body, so not parsed #99

Closed
knownasilya opened this issue Feb 16, 2015 · 1 comment
Closed

Properties never on req.body, so not parsed #99

knownasilya opened this issue Feb 16, 2015 · 1 comment

Comments

@knownasilya
Copy link

According to this if the value is on req.body, then it gets parsed.

I do a formdata post, and the fieldname is exercise[muscles] which is an array, but it's not on req.body (it's {})... So it never gets passed as an array, but a comma separated string..

@LinusU
Copy link
Member

LinusU commented May 1, 2015

Multer only parses multipart/form-data, are you sure that your data isn't arriving as urlencoded since there isn't any files attached?

You could try to add the following code to see the content-type that is sent to the server.

app.use(function (req, res, next) {
  console.log(req.get('Content-Type'))
  next()
})

Feel free to reopen if you find more info :)

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