I have a multipart/form-data content type which I have to send over a POST request.
multipart data contains application/octet-stream, i.e array of bytes.
I am using multer node module at the server side to process the incoming multipart data.
I am using multer.any() preparser to parse the incoming data.
I am not able to get the octet stream data in req.body.content parameter where "content" is the name parameter in the request header.
req.body.content returns empty.
When I add a filename parameter to the multipart request header, such as filename="content" and send the same octet stream, I can access the octet stream via req.files parameter.
But I dont want to send a filename parameter in the request header of multipart data, since I am not sending a file and only a payload.
Do I have to use a different preprocessor other than multer.any() to get the payload in req.body rather than req.filename?
Or do I have to use a different npm module other than multer to process octet stream in multipart data