-
Notifications
You must be signed in to change notification settings - Fork 257
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
Document how long presigned URLs from Storage.getUrl()
are valid for
#2014
Comments
Thanks for your response here @dorontal @gulmensedat can you also verify what storage access levels you've configured in your S3 bucket? When setting up with Amplify CLI did you follow the instructions listed here? => https://docs.amplify.aws/lib/storage/getting-started/q/platform/flutter/#provision-backend-storage |
Hi @gulmensedat any updates here? |
Using Streambuilder instead of Futurebuilder, I show the link of the image with CachedNetworkImage from my database, in case of an error with errorWidget, I send a request to refresh the link using the key address. That way I don't get this error. I have a problem when I use the above with FutureBuilder. As far as I understand, it is necessary to send a request with a key and download the image link. |
Hi @gulmensedat thank you for the followup. The problem you encountered might not be related to Streambuilder vs. Futurebuilder but to the fact that Storage.getUrl returns a presigned url from s3 which is only valid from 0-60 minutes. Not aware that this can be configured unfortunately. Your fix seems to be a good way forward, as making a new request will refresh the link and get a new presigned url. |
We'll update the docs to make this behavior more clear. Thanks for taking the time to create this issue and share your process to resolution. |
Storage.getUrl()
are valid for
Description
It works for a while without any problems, then it gives this error and doesn't shoot any images. This happens all the time in a loop. It works fine for half an hour and gives this error for half an hour.
Categories
Steps to Reproduce
widget
Screenshots
error
Platforms
Android Device/Emulator API Level
No response
Environment
Dependencies
Device
iPhone 12 Pro
OS
macOS 12.4
CLI Version
9.1.0
Additional Context
No response
The text was updated successfully, but these errors were encountered: