Deletes the specified files from the Media Manager.
The bulkDeleteFiles()
function returns a Promise that resolves when the files are deleted.
The deleted files are moved to the Media Manager's trash bin (TRASH_ROOT
folder) unless permanently deleted. To permanently delete files, pass the permanent
parameter with the value true
. Permanently deleting files isn't reversible, so make sure that these files aren't being used in a site or in any other way as the files will no longer be accessible.
Notes:
bulkRestoreFilesFromTrashBin()
to restore files from the Media Manager's trash bin.This function requires elevated permissions and runs only on the backend and on dashboard pages.
IDs of the files to move to the Media Manager's trash bin.
You can also pass the files' Wix media URLs. For example, ["wix:image://v1/0abec0_b291a9349a0b4da59067f76287e386fb~mv2.jpg/leon.jpg#originWidth=3024&originHeight=4032"]
.
Learn more in the File and Folder IDs article.
Options to use when deleting files.