From 95ef57c67aa6840838efa64e2781a80a76b9b003 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 16 Nov 2023 16:17:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9B=BE=E7=89=87=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/middleapi/controller/UploadController.php | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 app/middleapi/controller/UploadController.php diff --git a/app/middleapi/controller/UploadController.php b/app/middleapi/controller/UploadController.php new file mode 100644 index 000000000..5be70d314 --- /dev/null +++ b/app/middleapi/controller/UploadController.php @@ -0,0 +1,46 @@ +request->post('cid', 0); + $result = UploadService::image($cid); + return $this->success('上传成功', $result); + } catch (Exception $e) { + return $this->fail($e->getMessage()); + } + } + + /** + * @notes 上传文件 + * @return Json + * @author 段誉 + * @date 2021/12/29 16:27 + */ + public function file() + { + try { + $cid = $this->request->post('cid', 0); + $result = UploadService::file($cid); + return $this->success('上传成功', $result); + } catch (Exception $e) { + return $this->fail($e->getMessage()); + } + } + +} \ No newline at end of file