diff --git a/src/main/java/com/kusitms/samsion/common/infrastructure/s3/S3UploadService.java b/src/main/java/com/kusitms/samsion/common/infrastructure/s3/S3UploadService.java index 5d3d67f..dfeb1fe 100644 --- a/src/main/java/com/kusitms/samsion/common/infrastructure/s3/S3UploadService.java +++ b/src/main/java/com/kusitms/samsion/common/infrastructure/s3/S3UploadService.java @@ -45,6 +45,7 @@ public List uploadImgList(List imgList) { //단일 이미지 업로드 public String uploadImg(MultipartFile file) { + if(Objects.isNull(file)) return null; if(file.isEmpty()) return null; String originFileName = Normalizer.normalize(file.getOriginalFilename(), Normalizer.Form.NFC); diff --git a/src/main/java/com/kusitms/samsion/domain/user/application/dto/request/MyPetUpdateRequest.java b/src/main/java/com/kusitms/samsion/domain/user/application/dto/request/MyPetUpdateRequest.java index 37466e3..ef10553 100644 --- a/src/main/java/com/kusitms/samsion/domain/user/application/dto/request/MyPetUpdateRequest.java +++ b/src/main/java/com/kusitms/samsion/domain/user/application/dto/request/MyPetUpdateRequest.java @@ -1,5 +1,6 @@ package com.kusitms.samsion.domain.user.application.dto.request; +import org.springframework.lang.Nullable; import org.springframework.web.multipart.MultipartFile; import lombok.Builder; @@ -14,7 +15,9 @@ public class MyPetUpdateRequest { private int petAge; private String petName; + @Nullable private MultipartFile profileImage; + @Nullable private MultipartFile petImage; @Builder