Skip to content

Commit 8d35d4e

Browse files
authored
[refactor] 펀딩 이미지 업로드 스웨거 지원 (#369)
* [refactor] 펀딩 이미지 업로드 스웨거 지원 * work
1 parent 41db080 commit 8d35d4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/back/domain/funding/controller/FundingController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import lombok.RequiredArgsConstructor;
2424
import org.springframework.data.domain.Page;
2525
import org.springframework.http.HttpStatus;
26+
import org.springframework.http.MediaType;
2627
import org.springframework.http.ResponseEntity;
2728
import org.springframework.security.access.prepost.PreAuthorize;
2829
import org.springframework.security.core.annotation.AuthenticationPrincipal;
@@ -87,7 +88,7 @@ public class FundingController {
8788
.body(new RsData<>("201", "펀딩이 생성되었습니다.", response));
8889
}
8990

90-
@PostMapping("/images")
91+
@PostMapping(value = "/images", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
9192
@PreAuthorize("hasAuthority('ROLE_ARTIST') or hasAuthority('ROLE_ADMIN') or hasAuthority('ROLE_ROOT')")
9293
@Operation(
9394
summary = "펀딩 이미지 업로드",
@@ -96,7 +97,6 @@ public class FundingController {
9697
"types -> 업로드할 파일 타입. 대표 이미지(MAIN), 추가 이미지(ADDITIONAL), 썸네일(THUMBNAIL), 문서(DOCUMENT)"
9798
) public ResponseEntity<RsData<List<UploadResultResponse>>> uploadFundingImages(
9899
@RequestPart List<MultipartFile> files,
99-
@Parameter(hidden = true)
100100
@RequestParam List<FileType> types) {
101101
List<UploadResultResponse> uploaded = s3Service.uploadFiles(files, "funding-images", types);
102102
return ResponseEntity.ok(RsData.of("200", "이미지 업로드 성공", uploaded));

0 commit comments

Comments
 (0)