Slug the filename

So upoloads with weird characters like parens don’t get hoarked when trying to delete
This commit is contained in:
snipe 2017-07-14 02:38:13 -07:00
parent 1fda4593c1
commit 3eea1a23f8

View file

@ -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) {