affanshahid / multer-storage-cloudinary

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

Can we do something like streaming the file data and then checking if it went over MAX_SIZE? #45

Open Aryan3212 opened 1 year ago

Aryan3212 commented 1 year ago

Is this a multer/busboy/storage engine problem?

What I want to achieve-

  1. Stop upload and throw error if file size is over MAX_FILE_SIZE.

What is happening-

  1. File attempts to be uploaded regardless of the size and throws error at the end of the stream. Basically during 'end' event.