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