Skip to content

Commit

Permalink
skip getting image size if supplied by front end
Browse files Browse the repository at this point in the history
  • Loading branch information
13twelve committed Dec 5, 2024
1 parent a08abad commit 67411a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Http/Controllers/Admin/MediaLibraryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 67411a9

Please sign in to comment.