作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

@@ -79,32 +79,22 @@ class TencentCosService extends BaseService @@ -79,32 +79,22 @@ class TencentCosService extends BaseService
79 $httpHeaders = rtrim($httpHeaders, "&"); 79 $httpHeaders = rtrim($httpHeaders, "&");
80 //生成HttpString 80 //生成HttpString
81 $httpMethod = Str::lower($httpVerb); 81 $httpMethod = Str::lower($httpVerb);
82 - $uriPathname = $path.'/'.$fileName; 82 + $uriPathname = \request()->getPathInfo();
83 $httpString = $httpMethod . "\n" . $uriPathname . "\n" . $httpParameters . "\n" . $httpHeaders . "\n"; 83 $httpString = $httpMethod . "\n" . $uriPathname . "\n" . $httpParameters . "\n" . $httpHeaders . "\n";
84 //生成 StringToSign 84 //生成 StringToSign
85 $sha1String = sha1($httpString); 85 $sha1String = sha1($httpString);
86 $stringToSign = "sha1\n" . $keyTime . "\n" . $sha1String . "\n"; 86 $stringToSign = "sha1\n" . $keyTime . "\n" . $sha1String . "\n";
  87 + $filePath = $path.'/'.$fileName;
87 $sign = hash_hmac( 'sha1', $stringToSign, $signKey ); 88 $sign = hash_hmac( 'sha1', $stringToSign, $signKey );
88 $authorization = 89 $authorization =
89 "q-sign-algorithm=sha1&q-ak={$this->config['secretId']}&q-sign-time={$keyTime}&q-key-time={$keyTime}&q-header-list=&q-url-param-list=&q-signature={$sign}"; 90 "q-sign-algorithm=sha1&q-ak={$this->config['secretId']}&q-sign-time={$keyTime}&q-key-time={$keyTime}&q-header-list=&q-url-param-list=&q-signature={$sign}";
90 - $url = "https://{$this->config['bucket']}.cos.{$this->config['cosRegion']}.myqcloud.com{$uriPathname}"; 91 + $url = "https://{$this->config['bucket']}.cos.{$this->config['cosRegion']}.myqcloud.com{$filePath}";
91 // 打开文件流 92 // 打开文件流
92 $filePathUrl = config('filesystems.disks.upload')['root'].$path.'/'.$fileName; 93 $filePathUrl = config('filesystems.disks.upload')['root'].$path.'/'.$fileName;
93 return $this->http_put($url,$contentType,$authorization,$date,$filePathUrl); 94 return $this->http_put($url,$contentType,$authorization,$date,$filePathUrl);
94 } 95 }
95 96
96 /** 97 /**
97 - * @param Request $request  
98 - * @remark :生成$urlParamList + $httpParameters  
99 - * @name :ceshi  
100 - * @author :lyh  
101 - * @method :post  
102 - * @time :2023/7/19 14:05  
103 - */  
104 - public function queryParameters(Request $request){  
105 -  
106 - }  
107 - /**  
108 * @remark :上传文件到第三方 98 * @remark :上传文件到第三方
109 * @name : (http_put 99 * @name : (http_put
110 * @author :lyh 100 * @author :lyh