Skip to content

Commit fe50aef

Browse files
authored
fix: prevent unique name generation when rename is true
1 parent 0e25aa9 commit fe50aef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ public static function upload(string $key, string $destination, array $config =
409409
}
410410

411411
$fileSystem = new \Leaf\FS;
412-
(isset($config['rename']) || $config['rename']) ?: $config['unique'] = true;
412+
if(!isset($config['rename']) || !$config['rename']) $config['unique'] = true;
413413
$uploadedFile = $fileSystem->uploadFile(
414414
$file,
415415
preg_replace(

0 commit comments

Comments
 (0)