| | |
| | | package com.gkhy.exam.admin.system; |
| | | |
| | | import com.gkhy.exam.common.annotation.RepeatSubmit; |
| | | import com.gkhy.exam.common.api.CommonResult; |
| | | import com.gkhy.exam.system.domain.vo.UploadObjectVO; |
| | | import com.gkhy.exam.system.service.SysCommonService; |
| | |
| | | @Autowired |
| | | private SysCommonService commonService; |
| | | |
| | | @RepeatSubmit |
| | | @ApiOperation(value = "上传图片/文件") |
| | | @PostMapping("/uploadFile") |
| | | public CommonResult<UploadObjectVO> uploadFile(MultipartFile file){ |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 整个文件上传 |
| | | * 上传视频文件转m3u8 |
| | | *@param file 文件 |
| | | *@return String: 路径 |
| | | */ |
| | | @PostMapping("/uploadVideo") |
| | | public CommonResult uploadVideo(@RequestPart("file") MultipartFile file) throws Exception { ; |
| | | return CommonResult.success(commonService.uploadVideo2M3u8(file)); |
| | | } |
| | | |
| | | |
| | | } |