How to post multipart/form-data from Angular to Nodejs Multer?

前端 未结 1 600
感情败类
感情败类 2021-01-05 03:22

From Angular I want to upload a image as Blob data to nodeJS server. The server uses multer in the backend. The image file is generated by canvas render. I am getti

相关标签:
1条回答
  • 2021-01-05 03:53

    Remove your 'Content-Type': 'multipart/form-data' header and it should work.

    I got the same error, this is due to the missing boundary=.. just after multipart/form-data like the following working request:

    When you remove your header, browsers will add it automatically with the boundary=.. and it works.

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