Skip to content

Commit

Permalink
fix: 更正重复签名
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Jun 17, 2018
1 parent 7ea8732 commit 2081685
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Service/Tencentyun.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected function processWrite($file, $ext = '', $customName = '')

// 6. 对图片增加签名
if ($this->sign) {
$ret['url'] = $this->signUrl($ret['url'], $this->sign);
$ret['url'] = $this->signUrl($ret['url']);
}

return [
Expand Down
7 changes: 1 addition & 6 deletions src/Service/TencentyunCosV5.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,9 @@ protected function callUploadApi($file, $customName)
'Body' => fopen($file, 'rb'),
]);
if ($result->get('ObjectURL')) {
$url = $this->domain . '/' . $customName;
if ($this->sign) {
$url = $this->signUrl($url);
}

return [
'code' => 0, // 兼容已有的接口 TODO 更改为ret
'url' => $url,
'url' => $this->domain . '/' . $customName,
];
} else {
return $this->err([
Expand Down

0 comments on commit 2081685

Please sign in to comment.