diff --git a/src/Filesystem.php b/src/Filesystem.php index b3915b904..0ee74f269 100644 --- a/src/Filesystem.php +++ b/src/Filesystem.php @@ -187,7 +187,7 @@ public function publicUrl(string $path, array $config = []): string ?? throw UnableToGeneratePublicUrl::noGeneratorConfigured($path); $config = $this->config->extend($config); - return $this->publicUrlGenerator->publicUrl($path, $config); + return $this->publicUrlGenerator->publicUrl($this->pathNormalizer->normalizePath($path), $config); } public function temporaryUrl(string $path, DateTimeInterface $expiresAt, array $config = []): string @@ -195,7 +195,11 @@ public function temporaryUrl(string $path, DateTimeInterface $expiresAt, array $ $generator = $this->temporaryUrlGenerator ?? $this->adapter; if ($generator instanceof TemporaryUrlGenerator) { - return $generator->temporaryUrl($path, $expiresAt, $this->config->extend($config)); + return $generator->temporaryUrl( + $this->pathNormalizer->normalizePath($path), + $expiresAt, + $this->config->extend($config) + ); } throw UnableToGenerateTemporaryUrl::noGeneratorConfigured($path);