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
- Android SDK: Kotlin null Value Not Updat...
Hi team, I think you should check the Android SDK implementation once, as it seems to have an issue handling Kotlin **null** values. For example: When I send:...
- OAuth Missing redirect URL
Hello all, on a Flutter mobile app with latest Appwrite dependency (25.4.0) I always got "Missing redirect URL" - "Your OAuth login flow is missing a proper red...
- Need Help on Self Hosted Version of Appw...
Hi i wanted to test SMS OTP verify method but i am not able to do it. I follow all the steps but no luck. Please help me with this. I am using Appwrite self hos...