Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot download object from public bucket #469

Open
alustrement-bob opened this issue May 15, 2024 · 0 comments
Open

Cannot download object from public bucket #469

alustrement-bob opened this issue May 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alustrement-bob
Copy link

alustrement-bob commented May 15, 2024

Describe the bug

Downloading an object from a public bucket (column public=true, flag "Public" appears on Supabase Studio) works using the public URL (like https://xxx.supabase.co/storage/v1/object/public/public_bucket/file.jpg, but fails with the following methods :

  • From Supabase Studio>Storage>public_bucket>file.jpg>Download
  • Via supabase.js
    await supabase.storage.from("public_bucket") .download("file.jpg");
  • Via supabase-cli
    supabase --experimental storage cp -r "ss:///public_bucket" .

Error is : Error status 400: {"statusCode":"404","error":"Bucket not found","message":"Bucket not found"}

The bug doesn't appear on non public bucket.

System information

  • Environment WSL/Ubuntu
  • Version of node: v18.16.1
  • Version of supabase-js: 2.39.8
  • Version of supabase-cli: 1.162.4

Additional context

Tried on my local and Supabase cloud environments with the same behavior.
Tried with this fully permissive RLS :

create policy "anon_and_users_can_edit_all_storage_objects"
on "storage"."objects"
for all
to authenticated, anon
using (true);

create policy "anon_and_users_can_edit_all_storage_buckets"
on "storage"."buckets"
for all
to authenticated, anon
using (true);
@alustrement-bob alustrement-bob added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant