Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev

This commit is contained in:
liaofei 2023-05-17 10:00:48 +08:00
commit 62f821670c
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 [];
}