From e6a07d6b5291202e7081615d65424ee4e781802a Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Sat, 4 Feb 2023 22:50:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/AutoPackController.class.php | 11 ----------- Application/Base/Tool/ObsClient.class.php | 6 +++++- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/Application/Admin/Controller/AutoPackController.class.php b/Application/Admin/Controller/AutoPackController.class.php index 59eb2715e..824ae7f8a 100644 --- a/Application/Admin/Controller/AutoPackController.class.php +++ b/Application/Admin/Controller/AutoPackController.class.php @@ -3,21 +3,10 @@ namespace Admin\Controller; use Qiniu\Storage\UploadManager; -use User\Api\UserApi as UserApi; -use OSS\OssClient; use OSS\Core\OSsException; use Qiniu\Storage\BucketManager; use Qiniu\Auth; -use Think\Controller; -use BaiduBce\BceClientConfigOptions; -use BaiduBce\Util\Time; -use BaiduBce\Util\MimeTypes; -use BaiduBce\Http\HttpHeaders; use BaiduBce\Services\Bos\BosClient; -use BaiduBce\Services\Bos\CannedAcl; -use BaiduBce\Services\Bos\BosOptions; -use BaiduBce\Auth\SignOptions; -use BaiduBce\Log\LogFactory; use Think\Think; use Base\Service\GameSourceService; use Base\Tool\Printer; diff --git a/Application/Base/Tool/ObsClient.class.php b/Application/Base/Tool/ObsClient.class.php index e27f16769..0fa326ce7 100644 --- a/Application/Base/Tool/ObsClient.class.php +++ b/Application/Base/Tool/ObsClient.class.php @@ -27,7 +27,11 @@ class ObsClient implements StorageClient $this->endpoint = C('OBS_ENDPOINT'); $this->domain = C('OBS_DOMAIN'); $this->bucket = C('OBS_BUCKET'); - $this->client = new BaseObsClient($this->accessKey, $this->secretKey, $this->endpoint); + $this->client = new BaseObsClient([ + 'key' => $this->accessKey, + 'secret' => $this->secretKey, + 'endpoint' => $this->endpoint + ]); } public function upload($localFilePath, $saveFileName)