@RestController @RequestMapping(value="/video") @Validated @Permission public class VideoController extends Object
| 构造器和说明 |
|---|
VideoController() |
| 限定符和类型 | 方法和说明 |
|---|---|
Result |
checkFile(String module,
String md5)
获取文件分片状态,检测文件MD5合法性
FORM-DATA 请求
|
Result |
chunkUpload(Long chunkSize,
Integer totalChunk,
Integer currChunk,
String md5,
String module,
String remark,
org.springframework.web.multipart.MultipartFile file)
文件分块上传
FORM-DATA 请求
|
void |
play(@NotBlank(message="fileId \u4e0d\u80fd\u4e3a\u7a7a") String fileId) |
void |
playByPath(@NotBlank(message="filePath \u4e0d\u80fd\u4e3a\u7a7a") String filePath) |
Result |
quickUpload(String module,
String remark,
String md5,
String fileName)
秒传
|
@PostMapping(value="/chunkUpload",
consumes="multipart/form-data")
public Result chunkUpload(@RequestParam
Long chunkSize,
@RequestParam
Integer totalChunk,
@RequestParam
Integer currChunk,
@RequestParam
String md5,
@RequestParam(value="module",required=false)
String module,
@RequestParam(value="remark",required=false)
String remark,
@RequestParam
org.springframework.web.multipart.MultipartFile file)
throws Exception
chunkSize - 分块大小,字节totalChunk - 总块数量currChunk - 当前块数md5 - 文件MD5值module - 所属模块file - 文件IOExceptionException@PostMapping(value="/quickUpload") public Result quickUpload(@RequestParam(value="module",required=false) String module, @RequestParam(value="remark",required=false) String remark, @RequestParam(value="md5") String md5, @RequestParam(value="fileName") String fileName) throws Exception
Exception@PostMapping(value="/checkFile") public Result checkFile(@RequestParam(value="module",required=false) String module, @RequestParam(value="md5") String md5) throws Exception
md5 - Exception@GetMapping(value="/play")
public void play(@NotBlank(message="fileId \u4e0d\u80fd\u4e3a\u7a7a") @RequestParam(value="fileId")
@NotBlank(message="fileId \u4e0d\u80fd\u4e3a\u7a7a") String fileId)
@GetMapping(value="/playByPath")
public void playByPath(@NotBlank(message="filePath \u4e0d\u80fd\u4e3a\u7a7a") @RequestParam(value="filePath")
@NotBlank(message="filePath \u4e0d\u80fd\u4e3a\u7a7a") String filePath)
Copyright © 2024. All rights reserved.