-
Notifications
You must be signed in to change notification settings - Fork 0
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
#193 [feat] 회원 탈퇴 시 이미지 삭제 로직 추가 #196
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -256,9 +256,8 @@ private Boolean getIsSendStatus(Long applicationId, Long userId) { | |
} | ||
|
||
public DownloadUrlResponseDto getOfferImageDownloadUrl(final Long userId, final String offerImageUrl) { | ||
//Designer designer = designerJpaRepository.findById(userId).orElseThrow(() -> new NotFoundException(DESIGNER_NOT_FOUND_EXCEPTION)); | ||
String s3Key = offerImageUrl.substring(54); | ||
String preSignedUrl = s3Service.getPreSignedUrlToDownload(s3Key); | ||
Designer designer = designerJpaRepository.findById(userId).orElseThrow(() -> new NotFoundException(DESIGNER_NOT_FOUND_EXCEPTION)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. p5 : There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hellozo0 |
||
String preSignedUrl = s3Service.getPreSignedUrlToDownload(offerImageUrl); | ||
return new DownloadUrlResponseDto(preSignedUrl); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p5 :
이전 코드에서는 imagekey(?)값으로 이미지를 가져오지 않았는데 어떤 이유로 사용되었는지 알 수 있을까요..?!?!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hellozo0
이미지 url이 https://~~~/bucket/path 이런 식일 때
이미지를 삭제할 때 url 전체를 넣어서 삭제하는 것이 아닌, 앞에 있는 https://~~~ 를 제거해서 bucket/path 값을 넣어야 합니다...!
그래서 substring 로직을 추가했습니다!