Skip to content

Commit

Permalink
Merge e8fd1d5 into ae04449
Browse files Browse the repository at this point in the history
  • Loading branch information
qwertmax committed Apr 6, 2017
2 parents ae04449 + e8fd1d5 commit 8362d38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/StreamWrapper.php
Expand Up @@ -251,6 +251,7 @@ public function getExternalUrl() {

// Generate a standard URL.
$url = $this->getS3Url($path, $expiry, $args);
$url->setPath('/'. $path);
}

return (string) $url;
Expand Down
7 changes: 2 additions & 5 deletions src/StreamWrapperConfiguration.php
Expand Up @@ -112,11 +112,8 @@ protected static function required() {
*/
protected static function getS3Domain($bucket) {
$domain = StreamWrapper::S3_API_DOMAIN;
// If the bucket does not contain dots, the S3 SDK generates URLs that
// use the bucket name in the host.
if (strpos($bucket, '.') === FALSE) {
$domain = $bucket . '.' . $domain;
}

$domain = $bucket . '.' . $domain;

return $domain;
}
Expand Down

0 comments on commit 8362d38

Please sign in to comment.