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
- _APP_OPTIONS_ROUTER_PROTECTION
Hi Everyone, I just setup a fresh 1.9.0 on a server. Configured everything and now when i try to connect to appwrite for first time setup i get a _APP_OPTIONS_R...
- API key without database.read/write
I had some issues with my previous API key and I deleted it then I wanted to create a new one and discovered the database checkbook has no database.read/write j...
- dynamic key missing scopes for database ...
Here are the scopes listed, I get permission errors for reading row and document. Appears to be missing since last time i checked. Database 6 Scopes policies....