Skip to content

Commit

Permalink
Merge pull request #218 from fourix4/dev
Browse files Browse the repository at this point in the history
test : s3 upload error message 출력
  • Loading branch information
TaeHoon0 authored Jul 28, 2024
2 parents 0aa0631 + aae0e85 commit 13327fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,14 @@ public Response saveStudyCafe(@RequestPart(value = "data") ManagerRequestDto man
@RequestPart(value = "multiple_images", required = false) List<MultipartFile> multipleImages) {

managerService.saveStudyCafe(managerRequestDto, titleImage, multipleImages);
System.out.println(managerRequestDto.getClosedDay());
System.out.println(managerRequestDto.getCafeName());
System.out.println(managerRequestDto.getSeats());
System.out.println(managerRequestDto.getCafePhone());

return Response.success();
}

@PatchMapping("/manager")
public Response updateStudyCafe(@RequestPart(value = "data") ManagerRequestDto managerRequestDto,
@RequestPart(value = "title_image", required = false) MultipartFile titleImage,
@RequestPart(value = "multiple_images", required = false) List<MultipartFile> multipleImages) {
System.out.println(managerRequestDto.getCafePhone());
System.out.println(managerRequestDto.getCafeName());
System.out.println(managerRequestDto.getAddress().getCity());
System.out.println(managerRequestDto.getRoomInfo().getCancelAvailableTime());

managerService.updateStudyCafe(managerRequestDto, titleImage, multipleImages);
return Response.success();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ private String uploadImageToS3(MultipartFile image) throws IOException {
.withCannedAcl(CannedAccessControlList.PublicRead);
amazonS3.putObject(putObjectRequest); // S3에 이미지 업로드
}catch (Exception e){
System.out.println(e.getMessage());
throw new AmazonS3Exception(ErrorCode.IO_EXCEPTION_ON_IMAGE_UPLOAD.getMessage());
}finally {
byteArrayInputStream.close();
Expand Down

0 comments on commit 13327fd

Please sign in to comment.