How to use postman to test formdata?
Yes finally I have made it work. What I was doing wrong was not setting all the fields of the FormData() object ie, I didn't set the fields such as orderId because its value was null. When I set all the field values even if they were null, it worked. And also there was no need to set the Content-Type when you are sending a multipart/form-data...
Postman has a form-data POST body option that automatically does this for you.