dever 6 years ago
parent
commit
75f9188077
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/Lib/Input.php

+ 7 - 1
src/Lib/Input.php

@@ -196,7 +196,13 @@ class Input
         $div = array('', '');
         $type = 'button';
         if (isset($param['upload']) && $param['upload'] == 'qiniu') {
-            $upload = Dever::load('upload/qiniu.token?key=' . $param['key']);
+            $upload = Dever::project('upload');
+            if ($upload && !strstr($upload['path'], 'http')) {
+                $upload = Dever::load('upload/qiniu.token?result=1&key=' . $param['key']);
+            } else {
+                $upload = Dever::load('upload/qiniu.token?key=' . $param['key']);
+            }
+            
             if (isset($upload['domain'])) {
                 $domain = $upload['domain'];
                 $token = $upload['uptoken'];