Skip to content

Commit 9d613d5

Browse files
authored
修复代码getObjectUrlWithoutSign bug (#210)
* fix bug
1 parent e4e4c01 commit 9d613d5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Qcloud/Cos/Client.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
* @method object DeleteBucketGuetzli (array $arg)
9090
*/
9191
class Client extends GuzzleClient {
92-
const VERSION = '2.2.2';
92+
const VERSION = '2.2.3';
9393

9494
public $httpClient;
9595

@@ -280,6 +280,12 @@ public function getObjectUrl($bucket, $key, $expires = "+30 minutes", array $arg
280280
return $this->createPresignedUrl($request, $expires)->__toString();
281281
}
282282

283+
public function getObjectUrlWithoutSign($bucket, $key, array $args = array()) {
284+
$command = $this->getCommand('GetObject', $args + array('Bucket' => $bucket, 'Key' => $key));
285+
$request = $this->commandToRequestTransformer($command);
286+
return $request->getUri()-> __toString();
287+
}
288+
283289
public function upload($bucket, $key, $body, $options = array()) {
284290
$body = Psr7\stream_for($body);
285291
$options['Retry'] = $this->cosConfig['retry'];

0 commit comments

Comments
 (0)