rabin hai 3 meses
pai
achega
d8def174b8
Modificáronse 3 ficheiros con 32 adicións e 1 borrados
  1. 1 1
      api/Save.php
  2. 4 0
      lib/Save.php
  3. 27 0
      table/file_cite.php

+ 1 - 1
api/Save.php

@@ -18,7 +18,7 @@ class Save
 
     public function wangEditor()
     {
-        Dever::config('setting', array('output' => array
+        Dever::config('setting', array('output_app' => [], 'output' => array
         (
             'status' => array('errno', array('1' => 0, '2' => 1)),
             'msg' => 'message',

+ 4 - 0
lib/Save.php

@@ -161,6 +161,10 @@ class Save
             $name = $dest_name;
         }
         $dest = $this->config['id'] . '/' . $this->getDest($name, $ext, $uid);
+        $system = Dever::call("manage/common.system", array(false, true, "upload/manage.getFileField"));
+        if ($system && isset($system['database'])) {
+            $dest = $system['database'] . '/' . $dest;
+        }
         # type 1是文件复制 2是base64 3是远程文件复制
         $url = Dever::load('tool', 'upload')->get($this->config['save'])->upload($type, $source, $dest, $chunk, $this);
         $data = $this->up($source_name, $name, $dest, $this->config['size'], $this->config['width'] ?? 0, $this->config['height'] ?? 0);

+ 27 - 0
table/file_cite.php

@@ -0,0 +1,27 @@
+<?php
+return array
+(
+    'name' => '文件引用位置',
+    'partition' => 'Dever::call("manage/common.system", array(false, true, "upload/manage.getFileField"))',
+    # 数据结构
+    'struct' => array
+    (
+        'file_id'     => array
+        (
+            'name'      => '文件',
+            'type'      => 'int(11)',
+        ),
+
+        'table'     => array
+        (
+            'name'      => '表名',
+            'type'      => 'varchar(100)',
+        ),
+
+        'table_id'     => array
+        (
+            'name'      => '表id',
+            'type'      => 'int(11)',
+        ),
+    ),
+);