affanshahid / multer-storage-cloudinary

A Cloudinary multer storage engine
MIT License
104 stars 18 forks source link

Add ability to get error response from cloudinary #8

Closed PolymathWhiz closed 4 years ago

PolymathWhiz commented 5 years ago

There is no way to get the response status code and message from upload failure

affanshahid commented 4 years ago

I suppose this could be done. Currently when an error occurs it is reported to multer which removes the file (if it was already uploaded). The multer storage engine docs don't specify a way of getting this error to the user directly but I suppose it could be done using express error callbacks.