Skip to content

Commit 7274602

Browse files
authored
Merge pull request #5 from screenfluent/fix/file-extension-validation
Fix file extension validation to use original filename
2 parents aa40236 + 3c5fbe2 commit 7274602

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/FS/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ public static function upload($file, string $destination, array $options = [])
506506

507507
if ($options['validate']) {
508508
$fileType = static::type($temp);
509-
$fileExtension = (new Path($temp))->extension();
509+
$fileExtension = (new Path($file['name']))->extension(); // Changed from $temp to $file['name'] to fix extension validation
510510

511511
if (
512512
!empty($options['allowedTypes']) &&

0 commit comments

Comments
 (0)