multer removes the body object from the incoming request

63 Views Asked by At

When I use multer to parse a multipart data, the req.body is null

by inspecting the source code, I found out that it sets req.body to null

enter image description here

Do I miss something here?

1

There are 1 best solutions below

0
Sherif eldeeb On

by deeply understand the encoding multipart/form-data, I found out that the data itself is placed inside the headers, middlewares like multer just populate the data into req.body and req.files