diff --git a/src/AliOssAdapter.php b/src/AliOssAdapter.php index 92dc553..04d1f10 100644 --- a/src/AliOssAdapter.php +++ b/src/AliOssAdapter.php @@ -543,7 +543,7 @@ public function getVisibility($path) $this->logErr(__FUNCTION__, $e); return false; } - + if ($acl == OssClient::OSS_ACL_TYPE_PUBLIC_READ ){ $res['visibility'] = AdapterInterface::VISIBILITY_PUBLIC; }else{ @@ -553,15 +553,14 @@ public function getVisibility($path) return $res; } - /** * @param $path * * @return string */ - public function getUrl( $path ) + public function getUrl($path) { - return ( $this->ssl ? 'https://' : 'http://' ) . ( $this->isCname ? '' : $this->bucket ) . "{$this->endPoint}/$path"; + return ( $this->ssl ? 'https://' : 'http://' ) . ( $this->isCname ? '' : ($this->bucket . '.') ) . "{$this->endPoint}/$path"; } /** @@ -601,7 +600,7 @@ protected function normalizeResponse(array $object, $path = null) return $result; } - + $result = array_merge($result, Util::map($object, static::$resultMap), ['type' => 'file']); return $result;