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
- Invalid document structure: missing requ...
Hi, For some reasons, I cannot edit records in my table. It worked fine. `Invalid document structure: Unknown attribute: "learning"` I verified that we are p...
- Processing attribute
Hi, i need help on this issue. This attribute has been created yesterday.
- Question regarding BAA and Server locati...
I currently have a appwrite cloud account and would be considering another separate one, for this new one I would need to sign a BAA, on the pricing page it sho...