From 726874ce4ed1cbffc0276fd6d4d36d395acb1faa Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 14 Oct 2021 20:46:17 +0200 Subject: [PATCH] done #4791 --- src/app/Magic/Controllers/CubistMagicController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/Magic/Controllers/CubistMagicController.php b/src/app/Magic/Controllers/CubistMagicController.php index c40993f..50c1305 100644 --- a/src/app/Magic/Controllers/CubistMagicController.php +++ b/src/app/Magic/Controllers/CubistMagicController.php @@ -362,7 +362,7 @@ class CubistMagicController extends CubistCrudController /** @var UploadedFile $file */ $file = request()->files->get('file'); - $nfile = new UploadedFile($file->getPathname(), Str::slug($file->getClientOriginalName()) . '.' . $file->getClientOriginalExtension(), $file->getMimeType(), $file->getError()); + $nfile = new UploadedFile($file->getPathname(), Str::slug(str_replace('.' . $file->getClientOriginalExtension(), '', $file->getClientOriginalName())) . '.' . $file->getClientOriginalExtension(), $file->getMimeType(), $file->getError()); request()->files->set('file', $nfile); $media = $entry->addMediaFromRequest('file')->toMediaCollection($request->input('collection')); -- 2.39.5