from.remove()

删除同一存储桶中的文件.

const { data, error } = await supabase
  .storage
  .from('avatars')
  .remove(['folder/avatar1.png'])

Parameters

  • paths required object

    一个要删除的文件数组,包括路径和文件名。例如[`folder/image.png`].

Notes

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

Examples

删除文件

const { data, error } = await supabase
  .storage
  .from('avatars')
  .remove(['folder/avatar1.png'])

results matching ""

    No results matching ""