diff --git a/src/FS/File.php b/src/FS/File.php index cad63d0..4c2a87f 100644 --- a/src/FS/File.php +++ b/src/FS/File.php @@ -506,7 +506,7 @@ public static function upload($file, string $destination, array $options = []) if ($options['validate']) { $fileType = static::type($temp); - $fileExtension = (new Path($temp))->extension(); + $fileExtension = (new Path($file['name']))->extension(); // Changed from $temp to $file['name'] to fix extension validation if ( !empty($options['allowedTypes']) &&