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
- Deep Linking & Password reset
I am using react native with expo. I want to implement deep link with the url recived via email. So when clicked the link it opens my app. I havent ever used de...
- custom domain with CloudFlare
Hi all, it seems that CloudFlare has blocked cross-domain CNAME link which made my app hostname which is in CloudFlare, unable to create a CNAME pointing to clo...
- My organization's project is blocked
My organization's project is blocked so unblocked my organization then I will this