mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
fix(blurhash): Skip generation the if previews are disabled.
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
bb795239b5
commit
72bdb93b66
1 changed files with 5 additions and 0 deletions
|
|
@ -68,6 +68,11 @@ class GenerateBlurhashMetadata implements IEventListener {
|
|||
return;
|
||||
}
|
||||
|
||||
// Preview are disabled, so we skip generating the blurhash.
|
||||
if (!$this->preview->isAvailable($file)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$preview = $this->preview->getPreview($file, 64, 64, cacheResult: false);
|
||||
$image = @imagecreatefromstring($preview->getContent());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue