Commit 5368a2707191d4d02aa2aac995afe796b0843de4
Committed by
Gitee
1 parent
03da0354
fix: 移除匿名访问创建文件
Signed-off-by: 小賢 <511411352@qq.com>
Showing
1 changed file
with
0 additions
and
2 deletions
yudao-module-infra/src/main/java/cn/iocoder/yudao/module/infra/controller/app/file/AppFileController.java
| @@ -35,7 +35,6 @@ public class AppFileController { | @@ -35,7 +35,6 @@ public class AppFileController { | ||
| 35 | @Operation(summary = "上传文件") | 35 | @Operation(summary = "上传文件") |
| 36 | @Parameter(name = "file", description = "文件附件", required = true, | 36 | @Parameter(name = "file", description = "文件附件", required = true, |
| 37 | schema = @Schema(type = "string", format = "binary")) | 37 | schema = @Schema(type = "string", format = "binary")) |
| 38 | - @PermitAll | ||
| 39 | public CommonResult<String> uploadFile(@Valid AppFileUploadReqVO uploadReqVO) throws Exception { | 38 | public CommonResult<String> uploadFile(@Valid AppFileUploadReqVO uploadReqVO) throws Exception { |
| 40 | MultipartFile file = uploadReqVO.getFile(); | 39 | MultipartFile file = uploadReqVO.getFile(); |
| 41 | byte[] content = IoUtil.readBytes(file.getInputStream()); | 40 | byte[] content = IoUtil.readBytes(file.getInputStream()); |
| @@ -57,7 +56,6 @@ public class AppFileController { | @@ -57,7 +56,6 @@ public class AppFileController { | ||
| 57 | 56 | ||
| 58 | @PostMapping("/create") | 57 | @PostMapping("/create") |
| 59 | @Operation(summary = "创建文件", description = "模式二:前端上传文件:配合 presigned-url 接口,记录上传了上传的文件") | 58 | @Operation(summary = "创建文件", description = "模式二:前端上传文件:配合 presigned-url 接口,记录上传了上传的文件") |
| 60 | - @PermitAll | ||
| 61 | public CommonResult<Long> createFile(@Valid @RequestBody FileCreateReqVO createReqVO) { | 59 | public CommonResult<Long> createFile(@Valid @RequestBody FileCreateReqVO createReqVO) { |
| 62 | return success(fileService.createFile(createReqVO)); | 60 | return success(fileService.createFile(createReqVO)); |
| 63 | } | 61 | } |