简体   繁体   中英

AWS Presigned Url Generation

I need to implement aws presigned URL in python. but I want to make sure images are not greater than 2MB. but all new mobiles have images of around 8MB. How can I handle this? How can I compress the images without even uploading them to my server?

Here is a simple solution. Create a lambda function that will take images and compress them to <2MB and then uploads them to the client-side. You have to do processing on your side also for this plus lambda function will also add cost but it's a simple solution. You won't have to upload images to your server atlest. you can add check on frontend if image >2MB then only it will compress otherwise directly upload.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM