作者 lyh

gx

@@ -52,7 +52,7 @@ class TencentCosService extends BaseService @@ -52,7 +52,7 @@ class TencentCosService extends BaseService
52 $stringToSign = "{$httpVerb}\n{$contentMd5}\n{$contentType}\n{$date}\n/{$this->config['bucket']}/{$filePath}"; 52 $stringToSign = "{$httpVerb}\n{$contentMd5}\n{$contentType}\n{$date}\n/{$this->config['bucket']}/{$filePath}";
53 $sign = base64_encode(hash_hmac('sha1', $stringToSign, $this->config['secretKey'], true)); 53 $sign = base64_encode(hash_hmac('sha1', $stringToSign, $this->config['secretKey'], true));
54 $authorization = 54 $authorization =
55 - "q-sign-algorithm=sha1&q-ak={$this->config['secretId']}&q-sign-time={$time}&q-key-time={$expiredTime}&q-header-list=&q-url-param-list=&q-signature={$sign}"; 55 + "q-sign-algorithm=sha1&q-ak={$this->config['secretId']}&q-sign-time={$time}:{$expiredTime}&q-key-time={$time}:{$expiredTime}&q-header-list=&q-url-param-list=&q-signature={$sign}";
56 $url = "https://{$this->config['bucket']}.cos.{$this->config['cosRegion']}.myqcloud.com{$filePath}"; 56 $url = "https://{$this->config['bucket']}.cos.{$this->config['cosRegion']}.myqcloud.com{$filePath}";
57 // 打开文件流 57 // 打开文件流
58 $filePathUrl = config('filesystems.disks.upload')['root'].$path.'/'.$fileName; 58 $filePathUrl = config('filesystems.disks.upload')['root'].$path.'/'.$fileName;