bulkDeleteFolders( )


Temporarily deletes the specified folders from the Media Manager.

The bulkDeleteFolders() function returns a Promise that resolves when the folders are deleted.

The deleted folders are moved to the Media Manager's TRASH_ROOT folder (trash bin) unless permanently deleted. To permanently delete folders, pass the permanent parameter with the value true. Permanently deleting folders isn't reversible, so make sure that the files in these folders aren't being used in a site or in any other way as the files will no longer be accessible.

Notes:

  • When a folder is deleted, the files in that folder are deleted.
  • The specified folders can be from different parent folders.
  • Moving multiple folders at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.
  • Attempting to delete folders that are already in the trash bin doesn't result in an error.
  • If your site contains files from a non-permanently deleted media folder, the files still appear on your site as the deleted folder is still in the Media Manager (in the trash bin).
  • You can use the bulkRestoreFoldersFromTrashBin() function to restore folders from the Media Manager's trash bin.
Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Bookings Services and Settings
Manage Media Manager
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
folderIdsArray<string>Required

IDs of the folders to move to the Media Manager's trash bin.


optionsBulkDeleteFoldersOptions

Options to use when deleting folders.

Did this help?