|
|
@@ -315,6 +315,11 @@ class SystemStorageServices extends BaseServices
|
|
|
case 4:// cos 腾讯云
|
|
|
$upload = UploadService::init($type);
|
|
|
$list = $upload->listbuckets();
|
|
|
+ if (!empty($list['Name'])) {
|
|
|
+ $newList = $list;
|
|
|
+ $list = [];
|
|
|
+ $list[] = $newList;
|
|
|
+ }
|
|
|
$config = $this->getStorageConfig($type);
|
|
|
foreach ($list as $item) {
|
|
|
if (!$this->dao->count(['name' => $item['Name'], 'access_key' => $config['accessKey']])) {
|
|
|
@@ -438,6 +443,9 @@ class SystemStorageServices extends BaseServices
|
|
|
//是否添加过域名不存在需要绑定域名
|
|
|
$domainList = $upload->getDomian($info->name, $info->region);
|
|
|
$domainParse = parse_url($domain);
|
|
|
+ if (false === $domainParse) {
|
|
|
+ throw new AdminException('域名输入有误');
|
|
|
+ }
|
|
|
if (!in_array($domainParse['host'], $domainList)) {
|
|
|
//绑定域名到云储存桶
|
|
|
$res = $upload->bindDomian($info->name, $domain, $info->region);
|