mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Slug the filename
So upoloads with weird characters like parens don’t get hoarked when trying to delete
This commit is contained in:
parent
1fda4593c1
commit
3eea1a23f8
|
@ -57,7 +57,7 @@ class ImportController extends Controller
|
|||
}
|
||||
|
||||
$date = date('Y-m-d-his');
|
||||
$fixed_filename = str_replace(' ', '-', $file->getClientOriginalName());
|
||||
$fixed_filename = str_slug($file->getClientOriginalName());
|
||||
try {
|
||||
$file->move($path, $date.'-'.$fixed_filename);
|
||||
} catch (FileException $exception) {
|
||||
|
|
Loading…
Reference in a new issue