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

Info function returns object not found always #209

Open
AliNagy opened this issue Sep 4, 2024 · 0 comments
Open

Info function returns object not found always #209

AliNagy opened this issue Sep 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@AliNagy
Copy link

AliNagy commented Sep 4, 2024

Bug report

Describe the bug

'info' function seems to always return object not found.

{
    "statusCode": "404",
    "error": "not_found",
    "message": "Object not found"
}

To Reproduce

  1. Create a public bucket
  2. Upload object to bucket
  3. Use info using service key:
import { createClient } from "jsr:@supabase/supabase-js";

const supabaseUrl = "https://myurl.supabase.co";
const supabaseKey = "myservicekey";
const supabase = createClient(supabaseUrl, supabaseKey);

const exists = await supabase.storage.from("test").exists("test.png");

console.log(exists);

const info = await supabase.storage.from("test").info("test.png");

console.log(info);
  1. See output

Exists function:

{ "data": true, "error": null }

Info function:

{
  "data": null,
  "error": "StorageApiError: Object not found"
}

Expected behavior

Info should return object's info correctly.

@AliNagy AliNagy added the bug Something isn't working label Sep 4, 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