I generate the url to file in NextJS server action. In client component, i use that url as src image. It works fine when I give Any permission! I want to protect only authorized users are able to access. How can I do so!export function generateFileUrl(bucketId: string, fileId: string) {
const apiPath = /storage/buckets/${bucketId}/files/${fileId}/view?project=${PROJECT_ID};
const uri =new URL(API_DOMAIN_URL + apiPath);
return uri.toString()
}
I am thinking to write logic to check at server action, but just reliazed (less chance) , manual type of url , still can acess
Recommended threads
- Facing issue with querying the database ...
I'm using python appwrite function. Error: ```appwrite.exception.AppwriteException: Invalid query: Attribute not found in schema: _createdAt``` Code: ``` resu...
- Appwrite installation not found
I am updating from 1.4.3 -> 1.5.11 My appwrite installation is at /root/appwrite I run the PowerShell version of the 'installing the new version' script from ...
- Next SSR Auth session.secret is empty us...
Hi, I have problem with auth. When I try to login/signup using OTP, at the end session.secret is empty, but looks like a whole procces passed correctly. I have ...