mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Clean up the file extension on image file uploads
This commit is contained in:
parent
7d178da61c
commit
a6dfd67cd7
|
@ -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