Skip to content

Info function returns object not found always #209

Open
@AliNagy

Description

@AliNagy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions