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
- What does it means
I am looking for Appwrite for migration, but i am confused with the term "Unlimited" in Pricing table of Documents . Kindly Let me know what does it ...
- Unable to Create Storage After Upgrading...
We upgraded our Appwrite instance from version 1.8.0 to 1.9.0 and successfully ran the migration process. However, after the upgrade, we are no longer able to c...
- help!!!!
whats happening no clue pls help 🥲