We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 345caa3 + 5be9a5c commit baaefe7Copy full SHA for baaefe7
1 file changed
system/HTTP/Files/UploadedFile.php
@@ -400,12 +400,12 @@ public function isValid(): bool
400
*/
401
public function store(string $folderName = null, string $fileName = null): string
402
{
403
- $folderName = $folderName ?? date('Ymd');
+ $folderName = rtrim($folderName ?? date('Ymd'), '/') . '/' ;
404
$fileName = $fileName ?? $this->getRandomName();
405
406
// Move the uploaded file to a new location.
407
return ($this->move(WRITEPATH . 'uploads/' . $folderName, $fileName)) ?
408
- $folderName . DIRECTORY_SEPARATOR . $this->name : null;
+ $folderName . $this->name : null;
409
}
410
411
//--------------------------------------------------------------------
0 commit comments