From c507dc6031e0e9f771ef90ede522cf1b3e923b87 Mon Sep 17 00:00:00 2001 From: Alex Lingris Date: Wed, 23 Oct 2024 19:34:41 +0300 Subject: [PATCH] upload fix --- src/File/FileService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/File/FileService.php b/src/File/FileService.php index b12e74f..baf2eb0 100644 --- a/src/File/FileService.php +++ b/src/File/FileService.php @@ -79,7 +79,10 @@ class FileService throw new LucentException("File $filename not uploaded"); } - $this->createTemplates($disk, $path, $file); + if($this->isImage($mimetype)){ + $this->createTemplates($disk, $path, $file); + } + list($width, $height) = $this->isImage($mimetype) ? getimagesize($file) : [0, 0]; $recordFile = new RecordFile(