0

I have been trying to read multipart/mixed data in nodejs.

I have tried using bodyparser, busboy-connect, and few other modules but nothing seems to parse this data into req.body.

So if someone has any idea about how to implement this please leave an answer below. Thank you.

user1527152
  • 946
  • 1
  • 13
  • 37

1 Answers1

-1
app.use(myMiddleware);
 function myMiddleware(req, res, next) {
     req.rawBody = req.body;
     if (req.headers["content-type"] === "multipart/mixed") {
         req.body = req.body;
     }
     next();
}
Mickael B.
  • 4,755
  • 4
  • 24
  • 48