api端上传视频和文件接口
This commit is contained in:
parent
cceb393646
commit
a4130db352
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user