Пример #1
0
 public function removeUpload(MediaInterface $media)
 {
     if ($media->getPath() === null) {
         return;
     }
     if ($this->filesystem->has($media->getPath())) {
         $this->filesystem->delete($media->getPath());
     }
 }
Пример #2
0
 public function removeUpload(MediaInterface $media)
 {
     // Image is new
     if ($media->getPath() === null) {
         return;
     }
     parent::removeUpload($media);
     // Remove from Imagine cache
     $this->cache->remove($media->getPath());
 }