mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
parent
f4c7e3c1e9
commit
303f6da76f
1 changed files with 8 additions and 5 deletions
|
|
@ -477,12 +477,15 @@ class Preview {
|
|||
$cached = $this->isCached($fileId);
|
||||
if ($cached) {
|
||||
$stream = $this->userView->fopen($cached, 'r');
|
||||
$image = new \OC_Image();
|
||||
$image->loadFromFileHandle($stream);
|
||||
$this->preview = $image->valid() ? $image : null;
|
||||
$this->preview = null;
|
||||
if ($stream) {
|
||||
$image = new \OC_Image();
|
||||
$image->loadFromFileHandle($stream);
|
||||
$this->preview = $image->valid() ? $image : null;
|
||||
|
||||
$this->resizeAndCrop();
|
||||
fclose($stream);
|
||||
$this->resizeAndCrop();
|
||||
fclose($stream);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_null($this->preview)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue