when i give user read permission , its not showing , but when i give any permission , it is showing , but i am logged in right now . How will i fix this problem.
how are you trying to access the file?
in android i am using glide to show image
how exactly? code please?
val url="${apiConstants.ENDPOINT}/storage/buckets/${apiConstants.BUCKET_ID}/files/${data.img_id}/view?project=${apiConstants.PROJECT_ID}" Glide.with(viewHolder.itemView.context) .load(url) // image url //.placeholder(R.drawable.load2) // any placeholder to load at start .error(R.drawable.user4) // any image in case of error .centerCrop() // resizing .into(banImgg)
img_id comes from database
please make sure to wrap multi line code with 3 backticks
so this accesses a file without any authentication. that's why it works with the any permission.
are you able to pass headers using Glide?
you'll need to generate a JWT token (https://appwrite.io/docs/client/account?sdk=web-default#accountCreateJWT) and then pass it in the headers (https://stackoverflow.com/questions/51149546/how-to-add-authorization-in-header-by-glide-in-android-studio)
but it was working fine in self hosting appwrite
maybe your permissions were different when self hosting
no same permission
so for users only permission , i have to generate jwt , right?
but any body can steal this jwt and view my content for free
from the docs: The JWT secret is valid for 15 minutes from its creation and will be invalid if the user will logout in that time frame.
how will i generate JWT in client android app in appwrite?
Recommended threads
- Images/Videos in storage appearing broke...
I am running into a storage issue after upgrading my self-hosted Appwrite instance , all of my previously uploaded images and videos are now showing as broken i...
- `project_id_missing` in Cloud Function w...
I've got a cloud function written in `Dart-3.12` that I'm trying to create a file in a file bucket. I'm using the latest `dart_appwrite` sdk (`26.1.0`) and App...
- Batch Size of Bulk Operations
Is there any way to increase the Batch Size of Bulk Operations on Appwrite Self Hosted? When I try to perform more than 100 operations per batch, I get the foll...