Skip to content

Method storage.from(bucket).exists missing on front-end #1600

@EskelCz

Description

@EskelCz

Bug report

I'm trying to use the await supabase.storage.from(bucket).exists(path) that you have tests for, but no documentation. It doesn't exist when called from the front-end supabase bundle.
Can you please fix it and document the feature? It's a pretty basic thing to be able to check existence of a file without triggering a fetch error.

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

It's an inconsistency between node and browser APIs.

To Reproduce

Run this from a browser bundle:

const supabase = createBrowserClient(PUBLIC_SUPABASE_URL, PUBLIC_SUPABASE_PUBLISHABLE_KEY)
await supabase.storage.from(bucket).exists()

This triggers an error TypeError: supabase.storage.from(...).exists is not a function

Expected behavior

Expected to receive a boolean response.
Thanks.

System information

  • OS: macOS
  • supabase-js: 2.41.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingstorage-jsRelated to the storage-js library.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions