Skip to content

Commit

Permalink
Merge pull request #23 from Team-Wable/fix/#22-patch-profileImage
Browse files Browse the repository at this point in the history
fix profile image patch logic
  • Loading branch information
Hong0329 authored Aug 31, 2024
2 parents b8f9e8e + d3316ec commit 3c093ce
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,12 @@ public void updateMemberProfile2(Long memberId, MultipartFile multipartFile, Pro

try {
String s3ImageUrl = s3Service.uploadImage(memberId.toString(), multipartFile);
if (!"BLUE".equals(existedImage) && !"PURPLE".equals(existedImage) && !"GREEN".equals(existedImage)) {

String existedKey = removeBaseUrl(existedImage, S3_URL);

s3Service.deleteImage(existedKey);
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 3c093ce

Please sign in to comment.