0

I am new to the community. I am trying to upload 3 different versions of an image for different purposes to aws s3 using a node script. I am able to resize according to my needs, using the resize and suffix array in multer-sharp-s3, but I also want to limit the storage size for the resized images (for ex. max size 200kb for the first, 1 mb for second, and third is the original uploaded image which I have limited the size to 10 mb). Is there a way to do that?

  • 2
    It looks like you want us to write some code for you. While many users are willing to produce code for a coder in distress, they usually only help when the poster has already tried to solve the problem on their own. A good way to demonstrate this effort is to include the code you've written so far, example input (if there is any), the expected output, and the output you actually get (console output, tracebacks, etc.). The more detail you provide, the more answers you are likely to receive. Check the [FAQ] and [ask]. – Clijsters May 06 '20 at 09:32

1 Answers1

0
  1. Trigger lambda function when object is uploaded to S3
  2. Get the object in lambda using "event.object".
  3. Check if object exceeds max size
  4. Delete object if check return true.
suchorsky
  • 17
  • 4