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
- self-hosted auth: /v1/account 404 on saf...
Project created in React/Next.js, Appwrite version 1.6.0. Authentication works in all browsers except Safari (ios), where an attempt to connect to {endpoint}/v1...
- My account is blocked so please check an...
My account is blocked so please unblock my account because all the apps are closed due to which it is causing a lot of problems
- Applying free credits on Github Student ...
So this post is kind of related to my old post where i was charged 15usd by mistake. This happens when you are trying to apply free credits you got from somewh...