作者 lyh

gx

@@ -44,7 +44,7 @@ class TencentCosService extends BaseService @@ -44,7 +44,7 @@ class TencentCosService extends BaseService
44 // 构建请求URL 44 // 构建请求URL
45 $expiredTime = time() + 3600; 45 $expiredTime = time() + 3600;
46 $pathname = '/'.$this->config['bucket'].'/'.$fileName; 46 $pathname = '/'.$this->config['bucket'].'/'.$fileName;
47 - $signature = $this->generateSignature($this->config['secretKey'], $pathname, $expiredTime); 47 + $signature = $this->generateSignature($this->config['secretKey'], $pathname, $path ,$expiredTime);
48 $url = 'https://'.$this->config['bucket'].'.cos.'.$this->config['cosRegion'].'.myqcloud.com'.$pathname.'?sign='.$signature; 48 $url = 'https://'.$this->config['bucket'].'.cos.'.$this->config['cosRegion'].'.myqcloud.com'.$pathname.'?sign='.$signature;
49 // 打开文件流 49 // 打开文件流
50 $url_path = config('filesystems.disks.upload')['root'].$path; 50 $url_path = config('filesystems.disks.upload')['root'].$path;