diff --git a/src/main/java/ussum/homepage/application/post/controller/PostManageController.java b/src/main/java/ussum/homepage/application/post/controller/PostManageController.java index 3d29e0c..d618449 100644 --- a/src/main/java/ussum/homepage/application/post/controller/PostManageController.java +++ b/src/main/java/ussum/homepage/application/post/controller/PostManageController.java @@ -129,10 +129,9 @@ public ResponseEntity> createBoardPostFile(@Parameter(hidden = tr @PostMapping(value = "/data/files/{fileType}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity> createBoardDataPostFile(@Parameter(hidden = true) @UserId Long userId, - @PathVariable(name = "boardCode") String boardCode, @RequestPart(value = "files", required = false) MultipartFile[] files, @PathVariable(name = "fileType") String fileType) { - return ApiResponse.success(postManageService.createBoardDataPostFile(userId, boardCode, files, fileType)); + return ApiResponse.success(postManageService.createBoardDataPostFile(userId, files, fileType)); } @Operation(summary = "게시물 단건 조회 후 파일 혹은 이미지 삭제 api", description = """ diff --git a/src/main/java/ussum/homepage/application/post/service/PostManageService.java b/src/main/java/ussum/homepage/application/post/service/PostManageService.java index a730d4e..244e1bb 100644 --- a/src/main/java/ussum/homepage/application/post/service/PostManageService.java +++ b/src/main/java/ussum/homepage/application/post/service/PostManageService.java @@ -212,8 +212,8 @@ public PostFileListResponse createBoardPostFile(Long userId, String boardCode, M return PostFileListResponse.of(thumbnailUrl, postFileResponses); } @Transactional - public PostFileListResponse createBoardDataPostFile(Long userId, String boardCode, MultipartFile[] files, String fileType){ - PostFileMediatorResponse response = s3utils.uploadDataFileWithPath(userId, boardCode, files, fileType); + public PostFileListResponse createBoardDataPostFile(Long userId, MultipartFile[] files, String fileType){ + PostFileMediatorResponse response = s3utils.uploadDataFileWithPath(userId, BoardCode.DATA.getStringBoardCode(), files, fileType); List postFiles = convertUrlsToPostFiles(response); List afterSaveList = postFileAppender.saveAllPostFile(postFiles);