From 27105bc9793ee6e5815fb0ec169246742d8c75e7 Mon Sep 17 00:00:00 2001 From: gongfuxiang <2499232802@qq.com> Date: Mon, 24 Jun 2019 23:42:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=84=E4=BB=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Ueditor.php | 1 + extend/base/Uploader.php | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/application/api/controller/Ueditor.php b/application/api/controller/Ueditor.php index b943e7c09..b0ff80a1f 100755 --- a/application/api/controller/Ueditor.php +++ b/application/api/controller/Ueditor.php @@ -252,6 +252,7 @@ class Ueditor extends Common * ) */ $data = $up->getFileInfo(); + print_r($data);die; // 附件上传成功后处理钩子 $hook_name = 'plugins_controller_attachment_upload_handle_end'; diff --git a/extend/base/Uploader.php b/extend/base/Uploader.php index 1fa53c69f..4805bf746 100755 --- a/extend/base/Uploader.php +++ b/extend/base/Uploader.php @@ -487,13 +487,15 @@ class Uploader public function getFileInfo() { return array( - "state" => $this->stateInfo, - "url" => $this->fullName, - "title" => $this->fileName, - "original" => $this->oriName, - "type" => $this->fileType, - "size" => $this->fileSize + "state" => $this->stateInfo, + "url" => $this->fullName, + "path" => $this->filePath, + "title" => $this->fileName, + "original" => $this->oriName, + "type" => $this->fileType, + "size" => $this->fileSize, + "hash" => hash_file('sha256', $this->filePath, false), ); } - -} \ No newline at end of file +} +?> \ No newline at end of file -- GitLab