Triggered when a file is deleted.
If the movedToTrash
property in the event object true
, the file was moved to the Media Manager's trash bin. If the movedToTrash
property in the event object is false
, the file was permanently deleted.
function onFileDescriptorDeleted(handler: function): void;
handler(event: FileDescriptorDeletedEnvelope): void | Promise<void>
import { files } from "@wix/media";
files.onFileDescriptorDeleted((event) => {
// handle your event here
});