mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Merge pull request #58322 from nextcloud/backport/58003/stable32
This commit is contained in:
commit
69a95e4c42
1 changed files with 2 additions and 2 deletions
|
|
@ -202,8 +202,6 @@ class ImageManager {
|
|||
}
|
||||
|
||||
public function updateImage(string $key, string $tmpFile): string {
|
||||
$this->delete($key);
|
||||
|
||||
try {
|
||||
$folder = $this->getRootFolder()->getFolder('images');
|
||||
} catch (NotFoundException $e) {
|
||||
|
|
@ -217,6 +215,8 @@ class ImageManager {
|
|||
throw new \Exception('Unsupported image type: ' . $detectedMimeType);
|
||||
}
|
||||
|
||||
$this->delete($key);
|
||||
|
||||
if ($key === 'background') {
|
||||
if ($this->shouldOptimizeBackgroundImage($detectedMimeType, filesize($tmpFile))) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue