Back

loading images with urls

  • 0
  • Databases
  • Flutter
  • Storage
frankenstein
13 May, 2023, 05:20

I'm using url to load images in flutter by providing a url and editing the file id. It works fine but it's considered as a guest loading the image. I wanted to know the safety of this method

TL;DR
The user wants to know if there is a way to define dimensions in a URL when loading images. They also mention using the Image.network method but express concern about it refetching data when changing state. They mention using URLs to load images in Flutter and ask about the safety of this method. A suggested solution is to use the preview API instead of Image.network.
Drake
13 May, 2023, 05:33

Safety? It depends on you and the permissions you require

frankenstein
13 May, 2023, 05:34

It needs me to set the permissions to any user to load image

frankenstein
13 May, 2023, 05:35

The issue is images in pagination need to be catched so that they don't reload when i change state. That's why I'm opting for url

frankenstein
13 May, 2023, 05:37

If I use a future to load a uint8list then it will refetch again when I change state by adding data to the list

Drake
13 May, 2023, 05:44

If you want to make it private, you can still access the files by passing a JWT token. See https://github.com/appwrite/appwrite/discussions/3474#discussioncomment-3108707

frankenstein
14 May, 2023, 16:49

Image.network( 'https://{hostname}/v1/storage/buckets/{bucketId}/files/{fileId}/view?project={projectId}', headers: {"x-appwrite-jwt": jwt} )

frankenstein
14 May, 2023, 16:49

Like this right.?

frankenstein
14 May, 2023, 16:49

Thanks alot

frankenstein
14 May, 2023, 16:51

Cab you define dimensions in this url.??

Drake
14 May, 2023, 16:51

Use the preview API instead

frankenstein
14 May, 2023, 16:51

Okay

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more