multer
multer copied to clipboard
Multer not handling my form-data
This screenshot shows the raw body logged out and then shows logging req.file
and req.body
.
multer: 1.4.4
Relative code:
const multer = require('multer')
const upload = multer({ dest: `${__dirname}/files` })
app.post('/upload/:collection', upload.single('csv'), (req, res, next) => {
console.log('file', req.file)
console.log('body', req.body)
res.sendStatus(200)
})
Thanks, Troy