Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image Upload without Multer in Node.js

How can I upload and store images in MongoDB without using Multer/any other middleware? Is this possible?

like image 494
1976 Avatar asked Nov 01 '25 03:11

1976


1 Answers

You can use request data stream or pipe it to some other stream something like fs.createWriteStream, here is code example:

request.on('data', (data: any) => {
  console.log(data);
});

Hope this is what you need.

like image 139
Archil Labadze Avatar answered Nov 02 '25 19:11

Archil Labadze



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!