Amplify-js: Use browser cache for uploaded images to S3 Storage

Created on 13 Jun 2019  路  1Comment  路  Source: aws-amplify/amplify-js

Is your feature request related to a problem? Please describe.
I would like to upload images to S3 and show them with browser cache usage. Right now cause Storage.get generates different urls all requests use network. I am going to generate urls by my own without custom parameters as https://bucket.s3.amazonaws.com/public/img.png, but Storage.put doesn't support uploading files with public access ACL = "public-read"

Describe the solution you'd like

  1. Add ACL param to Storage.put config https://github.com/JIoJIaJIu/amplify-js/commit/c35299d7d9c8f17ffb58415bf1f8850c12226569
  2. Add s3:PutObjectAcl to generated amplify/backend/storage/xxxx/parameters.json to s3PermissionsAuthenticatedPublic

Describe alternatives you've considered
to setup Cloudfront with aws cli which can expose my user static (custom S3)

Storage feature-request needs-discussion

Most helpful comment

@JIoJIaJIu Thanks - we've got this down as a feature request.

>All comments

@JIoJIaJIu Thanks - we've got this down as a feature request.

Was this page helpful?
0 / 5 - 0 ratings