mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Merge pull request #14302 from uberbrady/fix_uploaded_file_extensions
Clean up the file extension on image file uploads
This commit is contained in:
commit
04c1d9cbff
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue