How do I send a file from postman to node.js with multer How do I send a file from postman to node.js with multer express express

How do I send a file from postman to node.js with multer


Just remove header Content-Type:application/x-www-form-urlencoded from the postman.

enter image description here


In Postman screenshot, the file field name is missing. The key should be csv since Multer accepts single file with that name.


This would help others like me who are searching for a similar answer.

I used a curl request instead of Postman.

curl -v -F csv=@file.csv http://localhost/url

There seems to be an issue with Postman.

https://github.com/expressjs/multer/issues/317

I also have this issue when I use Postman to send file using form-data. The attribute req.file or req.files is always undefined. If anyone has used Postman and was able to retrieve the file using req.file or req.files, please comment.