浏览代码

上传组件记录extparam参数

pppscn 6 年之前
父节点
当前提交
ac312ef41e
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      application/admin/controller/Ajax.php

+ 2 - 0
application/admin/controller/Ajax.php

@@ -54,6 +54,7 @@ class Ajax extends Backend
 
         //判断是否已经存在附件
         $sha1 = $file->hash();
+        $extparam = $this->request->post();
 
         $upload = Config::get('upload');
 
@@ -118,6 +119,7 @@ class Ajax extends Backend
                 'uploadtime'  => time(),
                 'storage'     => 'local',
                 'sha1'        => $sha1,
+                'extparam'    => json_encode($extparam),
             );
             $attachment = model("attachment");
             $attachment->data(array_filter($params));