2

I am writing node.js App. I am able to get data entered from postman via "x-www-form-urlencoded". But When I enter data with "form-data",the data is not accepted in API.I have tried with app.use(bodyParser.urlencoded({extended:false})) and app.use(bodyParser.urlencoded({extended:true})) . But still it is not working. Is there any way I can accept data via "form-data"?

1 Answers1

0

As suggested in post you cannot use body-parser for form-data.

Instead, you can use a module like multer.

Community
  • 1
  • 1
Ivan Vasiljevic
  • 5,478
  • 2
  • 30
  • 35