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

How can i get the req.body before bodyparser to implement dynamic folder uploading? Should I just use the event "end"? #42

Open
jackypan1989 opened this issue Feb 14, 2014 · 2 comments

Comments

@jackypan1989
Copy link

app.use('/upload', function (req, res, next) {
// imageVersions are taken from upload.configure()
upload.fileHandler({
uploadDir: function () {
return __dirname + '/public/uploads/' + req.body.uid
},
uploadUrl: function () {
return '/uploads/' + req.body.uid
}
})(req, res, next);
});
app.use(express.bodyParser());

@iraniamir
Copy link

Hi there, i have this problem too , you find something to fix it ?!

@ngudbhav
Copy link

In my case, all the req.body was moved to req.fields.

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

3 participants