Use nhost.storage.delete to delete a file. To delete a file the user must have permissions to delete the file in the storage.files table. Deleting the file using nhost.storage.delete() will delete both the file and its metadata.

const { error } = await nhost.storage.delete({ fileId: 'uuid' })

Parameters


params required StorageDeleteParams

PropertyTypeRequiredNotes
params.fileIdstring✔️