Attach fields to req.body and files to req.files like multer
dawkaka opened this issue · comments
Support plan
Community
- which support plan is this issue covered by? Community
- _is this issue currently blocking your project? yes
Context
Allow access to fields and files by attaching them to req body.
What problem are you trying to solve?
So fields and fields are accessible in middlewares
app.post('/upload-formidable', (req, res, next) => {
const form = formidable({});
// this is fine
form.parse(req, (err, fields, files) => {
res.json({ fields, files });
});
// but should also be able to do this
req.body // should be fields object
req.files // should be files object
});
Do you have a new or modified API suggestion to solve the problem?
No