Introduction
This pages explains how the media-module deletes media files from Shopware.
Asset Deletion
If an Asset
at a document contains a value for the deletedAt
-timestamp, the corresponding Shopware entity will lose its reference
to the media-entity that belongs to the asset.
The corresponding media file will only be removed from Shopware, if the Asset
is not used on any other document.
In other words: If an Asset
is used at multiple documents, the file is only going to be removed, if the asset is marked as
deleted at every document.
Remove Empty Media
The module is able to remove media-entities that do not contain a media file. They can occur due to errors in the file uploading process, third party plugins or manual misconfigurations in the administration panel.
If you activate the configuration option subsections.removeEmptyMedia.enabled
the module will clean up empty media entities before
handling any assets and media operations.
{
"subsections": {
"removeEmptyMedia": {
"enabled": false
}
}
}