0

I have a simple express app, however, when I try and post to it with express the body is empty.

app.post('/test', (req, res) => {
   console.log(req.body);
   res.send('Hello World!');
});

enter image description here

I have a body parser setup

app.use(bodyParser.raw({ limit: '50mb', type: ['image/*'] }),);

Can I send binary files from postman?

Nishant S Vispute
  • 713
  • 1
  • 7
  • 21
TommyD
  • 913
  • 3
  • 17
  • 32
  • You can try the following Postman Doc https://community.postman.com/t/how-to-upload-images-to-a-post-request/15256 – Nishant S Vispute Jun 07 '23 at 10:08
  • You need middleware capable of handling `multipart/form-data` request bodies. Does this answer your question? [Node/Express file upload](https://stackoverflow.com/a/50243907/283366) – Phil Jun 08 '23 at 02:58

0 Answers0