Storage Policy - User Access to File

I am trying to create a storage policy for the bucket photos such that:

  • User's can only access one file: photo-images/${uid}.jpg with CRUD operations.
I tried watching this: https://www.youtube.com/watch?v=4ERX__Y908k&ab_channel=Supabase

Here is what I have, and it won't save:

bucket_id = 'photos' and (storage.foldername(name))[1] = 'profile_photos' and (storage.filename(name))[1] = (auth.uid()::text).jpg


J
policy.png
YouTubeSupabase
Supabase storage allows you to store user generate files. In this episode of SupabaseTips, we will look at how we can make our storage buckets secure by setting row level security policies on our buckets.

Read more about Supabase storage from our official guide: https://supabase.com/docs/guides/storage

Learn more about Supabase šŸ‘‡

šŸ•ø Website: h...
Was this page helpful?