diff --git a/src/Form/Type/FileUploadType.php b/src/Form/Type/FileUploadType.php index e78d3bef1e..df7e9e5c64 100644 --- a/src/Form/Type/FileUploadType.php +++ b/src/Form/Type/FileUploadType.php @@ -159,7 +159,7 @@ public function configureOptions(OptionsResolver $resolver): void return strtr($fileNamePatternOrCallable, [ '[contenthash]' => sha1_file($file->getRealPath()), '[day]' => date('d'), - '[extension]' => $file->guessClientExtension(), + '[extension]' => $file->guessExtension(), '[month]' => date('m'), '[name]' => pathinfo($file->getClientOriginalName(), \PATHINFO_FILENAME), '[randomhash]' => bin2hex(random_bytes(20)),