Bucket upload getting RLS error
Hello, I am currently trying to upload an image to my bucket from my flutter app.
I setup a RLS policy as per documentation like attached.
My code is calling:
supabaseClient.storage
.from("recipe-image")
.upload(
"RcX9CHGr3C7qciM7",
*myFile,
fileOptions: FileOptions(
upsert: true,
contentType: 'image/jpeg',
),
);
The exact error message is:
StorageException(message: new row violates row-level security policy, statusCode: 403, error: Unauthorized)
The user is logged in and all other RLS for my normal tables work and there are currently no files in the bucket.
The bucket is set to public.
Any idea or pointers?

2 Replies
For upsert true you also need to meet select and update policies.
Ah, select I never thought to add.
Thank you very much!