Skip to content

Commit

Permalink
use dimensions sent from frontend when storing image
Browse files Browse the repository at this point in the history
  • Loading branch information
13twelve committed Dec 5, 2024
1 parent 6ceabfe commit a08abad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Http/Controllers/Admin/MediaLibraryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ public function storeFile($request)

[$w, $h] = getimagesize($uploadedFile->path());

if ($request->input('width') && $request->input('height')) {
$w = $request->input('width');
$h = $request->input('height');
}

$uploadedFile->storeAs($fileDirectory, $filename, $disk);

$fields = [
Expand Down

0 comments on commit a08abad

Please sign in to comment.