Commit 11a8fc8e0f1b0e3dd5ea2ec20482e2e20c730c2a
Committed by
Gitee
!1590 fix: 移除匿名访问创建文件
Merge pull request !1590 from 小賢/N/A
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 | 35 | @Operation(summary = "上传文件") |
| 36 | 36 | @Parameter(name = "file", description = "文件附件", required = true, |
| 37 | 37 | schema = @Schema(type = "string", format = "binary")) |
| 38 | - @PermitAll | |
| 39 | 38 | public CommonResult<String> uploadFile(@Valid AppFileUploadReqVO uploadReqVO) throws Exception { |
| 40 | 39 | MultipartFile file = uploadReqVO.getFile(); |
| 41 | 40 | byte[] content = IoUtil.readBytes(file.getInputStream()); |
| ... | ... | @@ -57,7 +56,6 @@ public class AppFileController { |
| 57 | 56 | |
| 58 | 57 | @PostMapping("/create") |
| 59 | 58 | @Operation(summary = "创建文件", description = "模式二:前端上传文件:配合 presigned-url 接口,记录上传了上传的文件") |
| 60 | - @PermitAll | |
| 61 | 59 | public CommonResult<Long> createFile(@Valid @RequestBody FileCreateReqVO createReqVO) { |
| 62 | 60 | return success(fileService.createFile(createReqVO)); |
| 63 | 61 | } | ... | ... |