From 67411a919d580e7da0b8b64dc55fd06ba311cbc6 Mon Sep 17 00:00:00 2001 From: Mike Byrne Date: Thu, 5 Dec 2024 14:14:09 +0000 Subject: [PATCH] skip getting image size if supplied by front end --- src/Http/Controllers/Admin/MediaLibraryController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/Controllers/Admin/MediaLibraryController.php b/src/Http/Controllers/Admin/MediaLibraryController.php index fee292e37..bbe69e0e2 100644 --- a/src/Http/Controllers/Admin/MediaLibraryController.php +++ b/src/Http/Controllers/Admin/MediaLibraryController.php @@ -185,11 +185,11 @@ public function storeFile($request) $uploadedFile = $request->file('qqfile'); - [$w, $h] = getimagesize($uploadedFile->path()); - if ($request->input('width') && $request->input('height')) { $w = $request->input('width'); $h = $request->input('height'); + } else { + [$w, $h] = getimagesize($uploadedFile->path()); } $uploadedFile->storeAs($fileDirectory, $filename, $disk);