master
elf 2 years ago
parent 4e2ac20b3c
commit e6a07d6b52

@ -3,21 +3,10 @@
namespace Admin\Controller; namespace Admin\Controller;
use Qiniu\Storage\UploadManager; use Qiniu\Storage\UploadManager;
use User\Api\UserApi as UserApi;
use OSS\OssClient;
use OSS\Core\OSsException; use OSS\Core\OSsException;
use Qiniu\Storage\BucketManager; use Qiniu\Storage\BucketManager;
use Qiniu\Auth; 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\BosClient;
use BaiduBce\Services\Bos\CannedAcl;
use BaiduBce\Services\Bos\BosOptions;
use BaiduBce\Auth\SignOptions;
use BaiduBce\Log\LogFactory;
use Think\Think; use Think\Think;
use Base\Service\GameSourceService; use Base\Service\GameSourceService;
use Base\Tool\Printer; use Base\Tool\Printer;

@ -27,7 +27,11 @@ class ObsClient implements StorageClient
$this->endpoint = C('OBS_ENDPOINT'); $this->endpoint = C('OBS_ENDPOINT');
$this->domain = C('OBS_DOMAIN'); $this->domain = C('OBS_DOMAIN');
$this->bucket = C('OBS_BUCKET'); $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) public function upload($localFilePath, $saveFileName)

Loading…
Cancel
Save