Back

Permission Problem

  • 0
  • Flutter
Monzim
27 Mar, 2023, 16:45

I have a bucket and set READ, Write permission for Users. But unable to read data even though the user is authenticated and has a valid session. [The user is verified]

TL;DR
The user is experiencing a permission problem when trying to read data from a bucket, even though they have set the appropriate permissions for users. The error message indicates that the HTTP request failed with a 404 status code. The solution suggested in a GitHub discussion is to ensure that a session is being used to request the image.
Drake
27 Mar, 2023, 17:05

Would you please provide the exact error?

Monzim
27 Mar, 2023, 17:12
TypeScript
════════ Exception caught by image resource service ════════════════════════════
The following NetworkImageLoadException was thrown resolving an image codec:
HTTP request failed, statusCode: 404, https://mydomain.mydomain.azure.mydomain.com/v1/storage/buckets/avatars/files/e948a230/view?project=1fcc34adc

When the exception was thrown, this was the stack
#0      NetworkImage._loadAsync
_network_image_io.dart:117
<asynchronous suspension>
Image provider: NetworkImage("https://mydomain.mydomain.azure.mydomain.com/v1/storage/buckets/avatars/files/e948a230/view?project=1fcc34adc", scale: 1.0)
Image key: NetworkImage("https://mydomain.mydomain.azure.mydomain.com/v1/storage/buckets/avatars/files/e948a230/view?project=1fcc34adc", scale: 1.0)

If the permission set to Any it work

Drake
27 Mar, 2023, 17:21

That would indicate a session isn't being used to request the image. See https://github.com/appwrite/appwrite/discussions/3474#discussioncomment-3109355

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