mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed #8719 - use same convention for file names on licenses as we do on assets
This commit is contained in:
parent
f0e04ab9e4
commit
57d25ebb20
|
@ -39,7 +39,8 @@ class LicenseFilesController extends Controller
|
|||
$upload_success = false;
|
||||
foreach ($request->file('file') as $file) {
|
||||
|
||||
$file_name = 'license-'.date('Y-m-d-His').'-'.$file->getBasename().'.'.$file->getClientOriginalExtension();
|
||||
|
||||
$file_name = 'license-'.$license->id.'-'.str_random(8).'-'.str_slug(basename($file->getClientOriginalName(), '.'.$file->getClientOriginalExtension())).'.'.$file->getClientOriginalExtension();
|
||||
|
||||
|
||||
$upload_success = $file->storeAs('private_uploads/licenses', $file_name);
|
||||
|
|
Loading…
Reference in a new issue