更新腾讯云存储同步问题。

This commit is contained in:
evoxwht 2023-05-17 09:51:02 +08:00
parent 51d849d920
commit 32666baf1e
2 changed files with 2 additions and 7 deletions

View File

@ -314,12 +314,7 @@ class SystemStorageServices extends BaseServices
break;
case 4:// cos 腾讯云
$upload = UploadService::init($type);
$cosList = $upload->listbuckets();
if (isset($cosList['Name'])) {
$list[] = $cosList;
} else {
$list = $cosList;
}
$list = $upload->listbuckets();
$config = $this->getStorageConfig($type);
foreach ($list as $item) {
if (!$this->dao->count(['name' => $item['Name'], 'access_key' => $config['accessKey']])) {

View File

@ -380,7 +380,7 @@ class Cos extends BaseUpload
{
try {
$res = $this->app()->listBuckets();
return $res->toArray()['Buckets'] ?? [];
return $res['Buckets']['Bucket'] ?? [];
} catch (\Throwable $e) {
return [];
}