Documentation / @zerotal/admin / index / deleteMedia
Function: deleteMedia()
deleteMedia(
item,options):Promise<[true] | [false,string]>
Defined in: admin/src/media.ts:276
Remove a file from both the catalogue and the disk.
The catalogue entry goes first. If the disk delete then fails the result is an orphaned file — wasted space, but nothing broken — whereas the other order can leave the library offering a file that no longer exists.
Parameters
item
options
provider
disk?
string
Returns
Promise<[true] | [false, string]>