-
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
이미지 도메인 추가 및 이미지 저장 #76
Conversation
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.
수고하셨습다
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
public class Image { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
private String fileName; |
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.
이미지 도메인을 만든 이유가 있을까요??
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.
s3에 저장된 이미지와 image객체의 생명주기를 똑같이 관리하려고 저렇게 구현했는데, 중간에 방법이 바뀌면서 필요없게 되었네요! 삭제하는 편이 좋을 것 같습니다.
public void delete(Long id) { | ||
Image byId = imageRepository.getById(id); | ||
amazonS3.deleteObject(s3Bucket.getS3Bucket(), byId.getFileName()); |
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.
Image 객체 이름이 byId보단 image가 좋을 거 같아요
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.
넵
🎫 관련 이슈
close #74
🔨 작업 내용
🏁 확인 사항
🙋🏻 덧붙일 말