Supabase Storage: list() returns an empty folder despite saved files
The saved object can be downloaded on a known path, but the list does not show records.
How to identify the source of the problem
Check SELECT policies on storage.objects and prefix, limit and offset submitted to list().
Compare the result for the authorized and unauthorised user, project name and exact error code.
Repair steps
Just give the necessary right of listing for a folder and make sure the prefix filter is correct.
How to Test Solution
The authorized user sees his own directory, and the lack of law does not reveal other people's names.
Security and restrictions
Change permissions and scheme first on test data with backup. Do not put service role in your browser.