Skip to content

Commit

Permalink
프로필 이미지 수정 관련 삭제 로직 수정2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hong0329 authored May 16, 2024
1 parent 7f3de77 commit f2a36b1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,13 @@ public void updateMemberProfile2(Long memberId, MultipartFile multipartFile, Pro

try {
String s3ImageUrl = s3Service.uploadImage(memberId.toString(), multipartFile);
existingMember.updateProfileUrl(s3ImageUrl);

if(!existedImage.equals(GHOST_IMAGE)&&!existedImage.equals(GHOST_IMAGE_S3)) {
String existedKey = removeBaseUrl(existedImage, S3_URL);
s3Service.deleteImage(existedKey);
}

existingMember.updateProfileUrl(s3ImageUrl);
} catch (IOException e) {
throw new RuntimeException(e.getMessage());
}
Expand Down

0 comments on commit f2a36b1

Please sign in to comment.