Skip to main content
Version: v2 RC

from.remove()

Deletes files within the same bucket

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

Parameters

  • pathsrequiredobject

    An array of files to delete, including the path and file name. For example ['folder/image.png'].

Notes

  • RLS policy permissions required:
    • buckets table permissions: none
    • objects table permissions: delete and select
  • Refer to the Storage guide on how access control works

Examples

Delete file

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