Sunday, 7 January 2018

How to compress images after they've been uploaded with multer?

I've spent all day trying to comb through how to do this. Basically it's user uploads file -> multer saves file to directory -> compress image -> overwrite original file with compressed image.Is this possible to achieve?My last attempt was to use onFileUploadComplete then run the compress function with imagemin and I got all excited and thought I found the solution. It didn't work.. turns out multer deprecated onFileUploadComplete.. damn. I'm out of ideas now.

Submitted January 08, 2018 at 02:18AM by Cofbof

No comments:

Post a Comment