Ā© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
7 replies
jdgamble555

Storage Policy - User Access to File

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

- User's can only access one file:
photo-images/${uid}.jpg
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
bucket_id = 'photos' and (storage.foldername(name))[1] = 'profile_photos' and (storage.filename(name))[1] = (auth.uid()::text).jpg


J
policy.png
YouTubeSupabase
How to Configure Access Control on Your Supabase Storage Buckets - ...
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...
How to Configure Access Control on Your Supabase Storage Buckets - ...
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

storage policy functions reference
SupabaseSSupabase / help-and-questions
4y ago
upload filelist supabase storage
SupabaseSSupabase / help-and-questions
4y ago
Policy to check user belongs to team
SupabaseSSupabase / help-and-questions
4y ago
uploading file to storage convert file to garbage
SupabaseSSupabase / help-and-questions
4y ago