protected function removeOldFile() { if (static::GENERATE_THUMBNAILS && is_dir($this->getUploadRootDir())) { Model::deleteThumbnails($this->getUploadRootDir(), $this->oldFileName); return; } parent::removeOldFile(); }