Also delete downscaled image files when deleting an image (closes #1499)

This commit is contained in:
Bernd Bestel
2021-07-02 20:50:52 +02:00
parent 34ffb96ae3
commit 90b8ea15ff
2 changed files with 28 additions and 11 deletions

View File

@@ -25,12 +25,7 @@ class FilesApiController extends BaseApiController
throw new \Exception('Invalid filename');
}
$filePath = $this->getFilesService()->GetFilePath($args['group'], $fileName);
if (file_exists($filePath))
{
unlink($filePath);
}
$this->getFilesService()->DeleteFile($args['group'], $fileName);
return $this->EmptyApiResponse($response);
}