From a4130db352bb2550363dbf6514a448625700e74e Mon Sep 17 00:00:00 2001 From: chenbo <709206448@qq.com> Date: Sat, 16 Sep 2023 13:57:02 +0800 Subject: [PATCH] =?UTF-8?q?api=E7=AB=AF=E4=B8=8A=E4=BC=A0=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=92=8C=E6=96=87=E4=BB=B6=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/UploadController.php | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/app/api/controller/UploadController.php b/app/api/controller/UploadController.php index 7e5e0cc51..8fc1b1f7e 100755 --- a/app/api/controller/UploadController.php +++ b/app/api/controller/UploadController.php @@ -44,6 +44,40 @@ class UploadController extends BaseApiController } } + /** + * @notes 上传视频 + * @return Json + * @author 段誉 + * @date 2021/12/29 16:27 + */ + public function video() + { + try { + $cid = $this->request->post('cid', 0); + $result = UploadService::video($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