from.list()

Lists all the files within a bucket.

const { data, error } = await supabase
.storage
.from('avatars')
.list()

Parameters

  • pathoptionalundefined | string

    The folder path.

  • optionsoptionalSearchOptions

    Search options, including limit, offset, and sortBy.

Notes

  • Policy permissions required:
    • buckets permissions: none
    • objects permissions: select

Examples

List files in a bucket

const { data, error } = await supabase
.storage
.from('avatars')
.list()