[SUPABASE] Deleting an object from a private bucket

Has anyone figured out how to delete an object in a private bucket using the new supabase functions?

I tried using the storage | delete files, but that doesn’t seem to work on a private bucket.

I have policies both on my public and private buckets, and they are the exact same policies (with the exception of the bucket ID obviously), but this supabase function only seems to work on files I delete from a public bucket and not a private one.

Just checking that I’m not the only one?

Hi @D-EFFCON :wave:

Just checked on my side and you should be able to delete files from a private bucket with that action.

Here’s what my policy looks like:

Note that if I unselect SELECT, the remove operation is deactivated:

CleanShot 2024-03-19 at 23.08.01

My action in WeWeb looks like this:

Note that the image 1.png file is directly in the root of the bucket, not nested in a folder.

Hope that helps!

Thanks Joyce! I tried again this morning without changing anything and it seems to be working now.

I’m suspecting in my sleep-deprived state the previous night, I ended up clicking on this and trying to map it through there

image

1 Like

I just had a similar issue - I could not delete a file from Supabase storage.
In my case the file was in a folder and the problem was that I used backslash as the separator instead of a regular forward slash.
So don’t use foldername\filename.ext
Use foldername/filename.ext