createBucket()

创建一个新的存储bucket

const { data, error } = await supabase
  .storage
  .createBucket('avatars', { public: false })

Parameters

  • id required string

    你正在创建的bucket的唯一标识符
  • options required object

    No description provided.
      Properties
    • public required boolean

      No description provided.

    Notes

    • 所需的策略权限:
      • buckets 权限: insert
      • objects 权限: none

    Examples

    创建bucket

    const { data, error } = await supabase
      .storage
      .createBucket('avatars', { public: false })
    

results matching ""

    No results matching ""