emptyBucket()

移除单个bucket内的所有对象。

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

Parameters

  • id required string

    您想清空的bucket的唯一标识符。

Notes

  • 所需的策略权限:
    • buckets 权限: select
    • objects 权限: select and delete

Examples

清空bucket

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

results matching ""

    No results matching ""