anacronw / multer-s3

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

Process images using jimp before uploading #118

Closed Sulaiman90 closed 3 years ago

Sulaiman90 commented 5 years ago

Hi, I would like to know whether there is a way to process images using jimp before uploading to s3. please help.

ServerOnTheMove commented 5 years ago

@Sulaiman90 - don't think there is an option. From what I understand multer & multer-s3 are modules to support uploading of files. Nothing more ;-) To facilitate the processing you would have to keep the data (file) in local (to your node.js process), then process the file, then upload to S3.

mahmoudafer commented 4 years ago

I found this gist really helpful to process images with sharp, but I guess it's the same with any other image processing package: https://gist.github.com/MorenoMdz/ccb169aaf7d39ad9b12cd5d709d83330

ossycodes commented 4 years ago

that snippet does not work for me. How were you able to fix yours??

ossycodes commented 4 years ago

Hi, I would like to know whether there is a way to process images using jimp before uploading to s3. please help.

how did you later this ??

LinusU commented 3 years ago

This library streams the file directly to S3 part by part so isn't really suited for this. I would recommend using Multer 3.x instead where this should be easy to implement...

trongithust commented 2 years ago

@LinusU have you release multer v3.x?