/**
* This function should be called for the life cycle event @ORM\PostRemove()
*/
public function remove()
{
if (static::GENERATE_THUMBNAILS && is_dir($this->getUploadRootDir())) {
Model::deleteThumbnails($this->getUploadRootDir(), $this->fileName);
return;
}
parent::remove();
}