anacronw / multer-s3

multer storage engine for amazon s3
MIT License
660 stars 190 forks source link

S3 Object Upload Cancellation #45

Closed tsambora closed 8 years ago

tsambora commented 8 years ago

Is there any way to cancel the file upload? Say if the request is unauthorized and we don't want the file from the request to be uploaded to S3.

LinusU commented 8 years ago

You could put a middleware that checks for authentication before the multer middleware. That way you can abort before uploading even begins...

tsambora commented 8 years ago

Ah yes. Thanks for your quick response. This is helpful.

LinusU commented 8 years ago

No problem :ok_hand: