Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Feb 5, 2024
2 parents 2d48d96 + f52b002 commit 58a9c27
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/Http/Requests/ImageUploadRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ public function handleImages($item, $w = 600, $form_fieldname = 'image', $path =
\Log::debug('Trying to upload to: '.$path.'/'.$file_name);

try {
$upload = Image::make($image->getRealPath())->resize(null, $w, function ($constraint) {
$upload = Image::make($image->getRealPath())->setFileInfoFromPath($image->getRealPath())->resize(null, $w, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
});
})->orientate();

} catch(NotReadableException $e) {
\Log::debug($e);
$validator = \Validator::make([], []);
Expand All @@ -138,10 +139,8 @@ public function handleImages($item, $w = 600, $form_fieldname = 'image', $path =
$cleanSVG = $sanitizer->sanitize($dirtySVG);

try {
\Log::debug('Trying to upload to: '.$path.'/'.$file_name);
Storage::disk('public')->put($path.'/'.$file_name, $cleanSVG);
} catch (\Exception $e) {
\Log::debug('Upload no workie :( ');
\Log::debug($e);
}
}
Expand Down

0 comments on commit 58a9c27

Please sign in to comment.