From 7e446bae091bc43fa330733579db1c1e4bfe7076 Mon Sep 17 00:00:00 2001 From: Anyon Date: Fri, 17 Jun 2022 16:10:46 +0800 Subject: [PATCH] Update Upload.php --- app/admin/controller/api/Upload.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/admin/controller/api/Upload.php b/app/admin/controller/api/Upload.php index e44791283..61275dd16 100644 --- a/app/admin/controller/api/Upload.php +++ b/app/admin/controller/api/Upload.php @@ -124,7 +124,11 @@ class Upload extends Controller */ public function done() { - $data = $this->_vali(['id.require' => '编号不能为空!']); + $data = $this->_vali([ + 'id.require' => '编号不能为空!', + 'hash.require' => '哈希不能为空!', + ]); + $data['uuid'] = AdminService::instance()->getUserId(); $file = SystemFile::mk()->where($data)->findOrEmpty(); if ($file->isEmpty()) $this->error('文件不存在!'); if ($file->save(['status' => 2])) {