I've looked through previous questions and they all seem to be solved via RLS changes. I've tried every policy I can think of and still cannot delete files from a bucket, either via code or thru the dashboard.
Here is my current policy, this is the only one that exists in the storage section. I'll change it to be more restrictive once I figure out what is stopping me from being able to delete files.
CREATE POLICY "An authenticated user can CRUD any files"ON storage.objectsFOR ALLTO authenticatedUSING (bucket_id = 'test');
CREATE POLICY "An authenticated user can CRUD any files"ON storage.objectsFOR ALLTO authenticatedUSING (bucket_id = 'test');
When I try to delete a file via the dashboard, it just hangs with a spinner saying
Deleting 1 file(s)...
Deleting 1 file(s)...
Here is a sample function that demos the problem I have trying to delete via code, plus a screenshot of the console output. I get a response saying
StorageApiError: The related resource does not exist
StorageApiError: The related resource does not exist
, but I pulled the data straight from a query so I know the file is there and the name is correct.
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.