فهرست منبع

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

evoxwht 2 سال پیش
والد
کامیت
32666baf1e
2فایلهای تغییر یافته به همراه2 افزوده شده و 7 حذف شده
  1. 1 6
      crmeb/app/services/system/config/SystemStorageServices.php
  2. 1 1
      crmeb/crmeb/services/upload/storage/Cos.php

+ 1 - 6
crmeb/app/services/system/config/SystemStorageServices.php

@@ -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']])) {

+ 1 - 1
crmeb/crmeb/services/upload/storage/Cos.php

@@ -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 [];
         }