Home

List all files in a bucket

Lists all the files within a bucket.

  • RLS policy permissions required:
    • buckets table permissions: none
    • objects table permissions: select
  • Refer to the Storage guide on how access control works
Parameters
  • path
    Optional
    string

    The folder path.

  • options
    Optional
    SearchOptions
  • parameters
    Optional
    FetchParameters

const { data, error } = await supabase
  .storage
  .from('avatars')
  .list('folder', {
    limit: 100,
    offset: 0,
    sortBy: { column: 'name', order: 'asc' },
  })