diff --git a/Entity/Listener/MediaListener.php b/Entity/Listener/MediaListener.php index fdde57a..5370aa5 100644 --- a/Entity/Listener/MediaListener.php +++ b/Entity/Listener/MediaListener.php @@ -29,7 +29,7 @@ public function __construct(UploaderManager $uploaderManager) * @param Media $media * @param LifecycleEventArgs $event */ - public function postRemoveHandler(Media $media, LifecycleEventArgs $event) + public function preRemoveHandler(Media $media, LifecycleEventArgs $event) { $this->uploaderManager->removeMediaFromStorage($media); } diff --git a/Resources/config/doctrine/Media.orm.xml b/Resources/config/doctrine/Media.orm.xml index c5de1de..3169b7e 100644 --- a/Resources/config/doctrine/Media.orm.xml +++ b/Resources/config/doctrine/Media.orm.xml @@ -15,7 +15,7 @@ - +