|
|
@@ -43,7 +43,7 @@ public class FileController {
|
|
|
|
|
|
@PostMapping("/upload")
|
|
|
@Operation(summary = "上传文件", description = "模式一:后端上传文件")
|
|
|
- public CommonResult<String> uploadFile(FileUploadReqVO uploadReqVO) throws Exception {
|
|
|
+ public CommonResult<String> uploadFile(@Valid FileUploadReqVO uploadReqVO) throws Exception {
|
|
|
MultipartFile file = uploadReqVO.getFile();
|
|
|
byte[] content = IoUtil.readBytes(file.getInputStream());
|
|
|
return success(fileService.createFile(content, file.getOriginalFilename(),
|