#[SOLVED] Unable to access image / video files using URL from flutter app
8 messages · Page 1 of 1 (latest)
I assume you're passing that url to something like network image. When you do that, the request is made unauthenticated since you're not passing any sort of session. One way to handle this is to generate a JWT token and pass it as a header
Thank you. That worked, but with this approach we have to maintain JWT token lifetime as it is only valid for 15 min and createJwt API is rate limited. Is there a better approach to handle this scenario?
You can call the storage.getFileDownload() or something like that, but that wouldn't use the network image widget
Yeah, it won't work for videos as well as there is no point in downloading the entire video file in advance. It would be much simpler, if SDK exposes an API to return the file url and abstracts the session management logic as it does for other APIs.
In 1.5, you can manage the session yourself so you can grab the session token and include that in the request
Great. Looking forward to so many nice features in 1.5. Thanks for your support.