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