diff --git a/src/Jasekz/Laradrop/Http/Controllers/LaradropController.php b/src/Jasekz/Laradrop/Http/Controllers/LaradropController.php index 9412162..273aff6 100644 --- a/src/Jasekz/Laradrop/Http/Controllers/LaradropController.php +++ b/src/Jasekz/Laradrop/Http/Controllers/LaradropController.php @@ -107,7 +107,7 @@ public function store() * move file to temp location */ $fileExt = Input::file('file')->getClientOriginalExtension(); - $fileName = str_replace('.' . $fileExt, '', Input::file('file')->getClientOriginalName()) . '-' . date('Ymdhis'); + $fileName = str_slug(str_replace('.' . $fileExt, '', Input::file('file')->getClientOriginalName()), '-') . '-' . date('Ymdhis'); $mimeType = Request::file('file')->getMimeType(); $tmpStorage = storage_path(); $movedFileName = $fileName . '.' . $fileExt;