Reference Custom Table In Storage Bucket Policy
Hey folks!
I'm experimenting with the storage bucket policies and have been trying to figure out how I can set up USING clause for a SELECT policy.
Here's some context:
What am I doing wrong?
I'm experimenting with the storage bucket policies and have been trying to figure out how I can set up USING clause for a SELECT policy.
Here's some context:
- I've created a custom
table and ausersrolestable. A user has a role assigned to them byrole_id. - I have a private storage bucket called
liveness_checksfor mp4 videos, and with INSERT allowed WITH CHECK: - However, I want SELECT to be allowed to the sentinel role, for which I tried doing this but it doesn't work:
- I use an edge function with service role key to get the public URLs to the files and deliver to my app. I tried playing the videos using the URLs but the videos do not load.
What am I doing wrong?