浏览代码

云存储路径

lizhen_gitee 1 年之前
父节点
当前提交
ef856cf4c7
共有 3 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      addons/alioss/config.php
  2. 2 2
      application/config.php
  3. 1 1
      thinkphp/library/think/db/Query.php

+ 1 - 1
addons/alioss/config.php

@@ -207,7 +207,7 @@ return [
         'title' => 'API接口使用云存储',
         'type' => 'bool',
         'content' => [],
-        'value' => '0',
+        'value' => '1',
         'rule' => 'required',
         'msg' => '',
         'tip' => '',

+ 2 - 2
application/config.php

@@ -304,7 +304,7 @@ return [
         'redis_selectdb' => 10,
     ],
 
-    'cos'                  => [
+   /* 'cos'                  => [
         // 链接
         "url"         => 'https://bucketname.cos.ap-shanghai.myqcloud.com',
         // 固定密钥
@@ -320,7 +320,7 @@ return [
         // 允许的路径前缀,可以根据自己网站的用户登录态判断允许上传的具体路径,例子: a.jpg 或者 a/* 或者 * (使用通配符*存在重大安全风险, 请谨慎评估使用)
         'allowPrefix'      => '*',
 
-    ],
+    ],*/
 
 // 客户音聊,微信三方登录
      'wxMiniProgram' => [

+ 1 - 1
thinkphp/library/think/db/Query.php

@@ -2615,7 +2615,7 @@ class Query
         if(!$path) return $path;
         // 获取当前域名
         if(strpos($path,'http://') === false && strpos($path,'https://') === false) {
-            $host = config("cos")['url'];
+            $host = config('upload.cdnurl');
             $url = $host.$path;
         } else {
             $url = $path;