Skip to content

Commit 09975b5

Browse files
committed
fix: patch up missing '/'
1 parent ea1c1d8 commit 09975b5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/FS/File.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,11 +531,11 @@ public static function upload($file, string $destination, array $options = [])
531531
'type' => static::type($name),
532532
'path' => (new Path($destination . DIRECTORY_SEPARATOR . $name))->normalize(),
533533
'extension' => (new Path($name))->extension(),
534-
'url' => ($_ENV['APP_URL'] ?? '/') . str_replace('storage/app/public', 'storage', str_replace(
534+
'url' => (rtrim($_ENV['APP_URL'] ?? '/', '/') . DIRECTORY_SEPARATOR . str_replace('storage/app/public', 'storage', str_replace(
535535
str_replace(['public/index.php', 'index.php'], '', $_SERVER['SCRIPT_FILENAME']),
536536
'',
537537
(new Path($destination . DIRECTORY_SEPARATOR . $name))->normalize()
538-
))
538+
)))
539539
];
540540

541541
try {

0 commit comments

Comments
 (0)