Clean up the file extension on image file uploads
This commit is contained in:
parent
7d178da61c
commit
a6dfd67cd7
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ class ImageUploadRequest extends Request
|
||||||
|
|
||||||
if (!config('app.lock_passwords')) {
|
if (!config('app.lock_passwords')) {
|
||||||
|
|
||||||
$ext = $image->getClientOriginalExtension();
|
$ext = $image->guessExtension();
|
||||||
$file_name = $type.'-'.$form_fieldname.'-'.$item->id.'-'.str_random(10).'.'.$ext;
|
$file_name = $type.'-'.$form_fieldname.'-'.$item->id.'-'.str_random(10).'.'.$ext;
|
||||||
|
|
||||||
\Log::info('File name will be: '.$file_name);
|
\Log::info('File name will be: '.$file_name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue