作者 lyh

gx

@@ -26,8 +26,6 @@ class TencentCosService extends BaseService @@ -26,8 +26,6 @@ class TencentCosService extends BaseService
26 26
27 public function __construct(){ 27 public function __construct(){
28 $this->cos = config('filesystems.disks.cos'); 28 $this->cos = config('filesystems.disks.cos');
29 - var_dump($this->cos);  
30 - die();  
31 $this->config['cosRegion'] = $this->cos['region']; 29 $this->config['cosRegion'] = $this->cos['region'];
32 $this->config['appId'] = $this->cos['credentials']['appId']; 30 $this->config['appId'] = $this->cos['credentials']['appId'];
33 $this->config['secretId'] = $this->cos['credentials']['secretId']; 31 $this->config['secretId'] = $this->cos['credentials']['secretId'];
@@ -45,8 +43,6 @@ class TencentCosService extends BaseService @@ -45,8 +43,6 @@ class TencentCosService extends BaseService
45 public function upload_image($path,$image_type){ 43 public function upload_image($path,$image_type){
46 // 构造请求方法、URL和头部 44 // 构造请求方法、URL和头部
47 $url = 'https://' . $this->config['bucket'] . '.cos.' . $this->config['cosRegion'] . '.myqcloud.com'.$path; 45 $url = 'https://' . $this->config['bucket'] . '.cos.' . $this->config['cosRegion'] . '.myqcloud.com'.$path;
48 - var_dump($url);  
49 - die();  
50 $this->method = 'PUT'; 46 $this->method = 'PUT';
51 $headers = array( 47 $headers = array(
52 'Authorization: ' . $this->cosAuthorization($this->config['appId'], $this->config['secretId'], $this->config['secretKey'], $this->method, '/' . $this->config['bucket'] . $path), 48 'Authorization: ' . $this->cosAuthorization($this->config['appId'], $this->config['secretId'], $this->config['secretKey'], $this->method, '/' . $this->config['bucket'] . $path),