From d951523154a6f0a6950c9e9668f7c284b84e9032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Till=20Kru=CC=88ss?= Date: Sat, 18 Nov 2017 09:20:30 -0800 Subject: [PATCH] include prefix in url and remove temp variable --- src/Illuminate/Filesystem/FilesystemAdapter.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Illuminate/Filesystem/FilesystemAdapter.php b/src/Illuminate/Filesystem/FilesystemAdapter.php index 1ae45fa85218..151724199737 100644 --- a/src/Illuminate/Filesystem/FilesystemAdapter.php +++ b/src/Illuminate/Filesystem/FilesystemAdapter.php @@ -394,13 +394,11 @@ public function url($path) */ protected function getAwsUrl($adapter, $path) { - $config = $this->driver->getConfig(); - // If an explicit base URL has been set on the disk configuration then we will use // it as the base URL instead of the default path. This allows the developer to // have full control over the base path for this filesystem's generated URLs. - if (! is_null($url = $config->get('url'))) { - return $this->concatPathToUrl($url, $path); + if (! is_null($url = $this->driver->getConfig()->get('url'))) { + return $this->concatPathToUrl($url, $adapter->getPathPrefix().$path); } return $adapter->getClient()->getObjectUrl(