Error: invalid json with multer and body-parser

后端 未结 1 647
死守一世寂寞
死守一世寂寞 2021-02-05 23:39

I am currently using multer for multipart/form-data in node.js application alongside with body-parser.

I tried to POST form-data using POST

1条回答
  •  粉色の甜心
    2021-02-06 00:02

    The problem is not that you have both libraries body-parser and multer. If you try to post with a browser extension like postman, please make sure Content-Type is multipart/form-data and not application/json in your request header.

    0 讨论(0)
提交回复
热议问题