I am trying to set up image upload for a website with a node.js backend. I am sending the image file as a FormData object on a ajax post request. Can I use Multer without Express to upload the images? If so, how can I do it? (considering that I am not using express I have to manually collect post data)
Do not use multer, use busboy instead. multer is only a wrapper around busboy to stick into express' middleware system. Multer is however not strcitly required to be used with express, it just is about to fit into express.
So you could use multer by writing some "unwrapping" code. But it is easier to use busboy without unwrapping the wrapping.
There are straightforward examples on the busboy npm page.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With