Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.5] Fix custom URLs with prefix/root for AWS storage #22130

Merged
merged 1 commit into from
Nov 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/Illuminate/Filesystem/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down