multer icon indicating copy to clipboard operation
multer copied to clipboard

Multer not handling my form-data

Open 34fame opened this issue 2 years ago • 0 comments

This screenshot shows the raw body logged out and then shows logging req.file and req.body.

Screen Shot 2022-03-16 at 12 27 14 PM

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

34fame avatar Mar 16 '22 19:03 34fame