Merge pull request #14302 from uberbrady/fix_uploaded_file_extensions

Clean up the file extension on image file uploads
This commit is contained in:
snipe 2024-02-19 16:53:47 +00:00 committed by GitHub
commit 04c1d9cbff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,7 @@ class ImageUploadRequest extends Request
if (!config('app.lock_passwords')) {
$ext = $image->getClientOriginalExtension();
$ext = $image->guessExtension();
$file_name = $type.'-'.$form_fieldname.'-'.$item->id.'-'.str_random(10).'.'.$ext;
\Log::info('File name will be: '.$file_name);