From 82cb0ef6d1e2f333d92fcc342f251a0382a6e742 Mon Sep 17 00:00:00 2001
From: PPPSCN <35696959@qq.com>
Date: Sat, 6 May 2017 23:42:13 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=9C=AC=E5=9C=B0=E4=B8=8A?=
=?UTF-8?q?=E4=BC=A0=E5=9B=BE=E7=89=87=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/extra/upload.php | 4 ++--
public/assets/js/backend/general/attachment.js | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/application/extra/upload.php b/application/extra/upload.php
index 93504bfa..d92c7faf 100644
--- a/application/extra/upload.php
+++ b/application/extra/upload.php
@@ -7,9 +7,9 @@ return [
*/
'uploadurl' => 'ajax/upload',
/**
- * 又拍云或本机的CDN地址
+ * 本机的CDN地址或又拍云http://yourbucketname.b0.upaiyun.com
*/
- 'cdnurl' => 'http://yourbucketname.b0.upaiyun.com',
+ 'cdnurl' => '',
/**
* 上传成功后的通知地址
*/
diff --git a/public/assets/js/backend/general/attachment.js b/public/assets/js/backend/general/attachment.js
index a9ec03c8..b4902f92 100644
--- a/public/assets/js/backend/general/attachment.js
+++ b/public/assets/js/backend/general/attachment.js
@@ -56,7 +56,8 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table', 'config'], function (
thumb: function (value, row, index) {
//console.log(row);
if (row.mimetype.indexOf("image") > -1) {
- if (Config.upload.bucket.replace(/^\s+|\s+$/gm, '').length === 0) {
+ var reg = /ajax\/upload$/;
+ if (reg.test(Config.upload.uploadurl)) {
return '
';
} else {
return '
';