-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce size of image uploads to S3 with Storage.put
#10930
Comments
Hello @redacr11, thank you for raising this request! We are actively looking into ways we can improve the Storage APIs and this is definitely something that we are taking into consideration. We will keep this issue updated as we make progress towards this feature. |
Hello @redacr11, Glad to take this input into the review that @hdworld11 is leading to look at future behavior for Storage. Would you expect the compression to take place on the client before it is uploaded or to be uploaded full size and resized by resources in the cloud? I think there may be workarounds in either case such as those suggested by stackoverflow users to resize in app or using lambda triggers to resize uploads to s3. I've explored this use-case using lambda triggers, but haven't tried any of the client side resize options. |
I did try to use the I haven't tried the lambda approach as I'm not sure how to use it. I would have thought that having the compression option in the |
Hello, are there any updates on this? |
Hi @redacr11 , From your response, it sounds like you would prefer to do the resizing after the file is uploaded to the cloud, either in node or a lambda. I would recommend trying the lambda approach. This is on our list to consider as a future feature request, but isn't being worked on actively at this time. I found an example of doing this that was posted a few years back. Some of the specifics might be a bit different, you may find a more recent tutorial with a bit of searching. |
lambda trigger when file is uploaded, then nodejs function to reduce size, or create thumb etc. |
Is this related to a new or existing framework?
React Native
Is this related to a new or existing API?
Storage
Is this related to another service?
No response
Describe the feature you'd like to request
Currently, when uploading images to S3 via
Storage.put
it uploads the image as it is without reducing the size of it. In the case that the picture is not big it's not a real problem; the real issue arises when the image I'm trying to upload is rather large.Describe the solution you'd like
I think having some sort of parameters to pass to decide the compression ratio and/or height and width of the photo that will be uploaded on S3 would be fantastic.
Describe alternatives you've considered
I'm currently building an app using React Native with Expo and the only solution available so far is
manipulateAsync
. It does compress the image but it does not work when used in conjunction withStorage.put
.Additional context
No response
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: