Skip to content
Discussion options

You must be logged in to vote

Found it — and it was on our end, not a Supabase bug. Great question, that was exactly it.

We had NO SELECT policy at all on storage.objects for either bucket (only INSERT/UPDATE/DELETE). Our original migration reasoned "bucket is public, reads go through the public URL, no SELECT policy needed" — true for a browser hitting the public URL directly, but upload(..., { upsert: true }) needs to check whether an object at that path already exists first (an authenticated SELECT against storage.objects, subject to RLS) before deciding insert vs. update. With zero SELECT policy, that internal existence check always evaluated to "not visible", and the whole upsert failed closed with the RLS messag…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@Krishna-Agrawall
Comment options

Answer selected by Krishna-Agrawall
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants