Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multipartFile 관련 에러 디버깅 #198

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ public class PostController {
})
@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
public ResponseEntity<Void> save(
@RequestPart(name = "request") @Valid final PostCreateRequest request,
@RequestPart(name = "contentImages") final List<MultipartFile> contentImages,
@RequestPart(name = "optionImages") final List<MultipartFile> optionImages,
@RequestPart @Valid final PostCreateRequest request,
@RequestPart final List<MultipartFile> contentImages,
@RequestPart final List<MultipartFile> optionImages,
@Auth final Member loginMember
) {
final long postId = postService.save(request, loginMember, contentImages, optionImages);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public record PostCreateRequest(
@Length(max = 1000, message = "내용은 최대 1000자까지 입력 가능합니다.")
String content,

String imageUrl,

@Schema(description = "게시글의 여러 선택지")
@Valid
@NotNull(message = "선택지는 최소 2개 이상 등록해야 합니다.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public record PostOptionCreateRequest(
@Schema(description = "선택지 내용", example = "content")
@NotBlank(message = "해당 선택지의 내용을 입력해주세요.")
@Length(max = 50, message = "선택지의 내용은 최대 50자까지 입력 가능합니다.")
String content
String content,

String imageUrl
) {
}
1 change: 0 additions & 1 deletion backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ spring:
path: /h2-console
settings:
web-allow-others: true
web-admin-password:

logging:
level:
Expand Down