-
Notifications
You must be signed in to change notification settings - Fork 260
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
How do I use it with bodyparser #11
Comments
I found as a solution not to use bodyparser at all... I will have to rewrite most of my code :-( |
I thought this issue occurred if bodyParser middleware was called out after express-fileupload. But based on your issue that's not the case. I'm going to look into this and will keep you posted. |
I'm having a similar issue with this, when I define fileUpload() before the app.use bodyParser, then When I define it after the bodyParser, then I have no problem with I'm not sure if this is of much help to you, but I have made this small node application that reproduces the failure when I am using node version v7.2.1 |
Sorry I have actually just found that you knew about this exact problem here: #9 |
just pulled this from a project i'm working on: app.use(bodyParser.json()); // for parsing application/json
app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded
app.use(fileUpload({
limits: {
fileSize: 1 * 1024 * 1024,
fields: 50,
files: 1,
parts: 51,
}
})); it works for me |
I developed all my project with bodyparser but recently, someone asked me to add a way to upload some files. But I didn't manage to make your project work with mine. I tried something like this :
with a form generated this way :
but when I try to submit my form
req.files
is alwaysundefined
as tells meconsole.log(req.files);
in my server-side code... could you please explain me why ? I expect bodyparser is blocking multipart requests but if it is actually, is there a way to workaround ? And if yes, how ?The text was updated successfully, but these errors were encountered: