-
Notifications
You must be signed in to change notification settings - Fork 2
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
refactor: Image 업로드 시 ImageKey 관리 #226
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.
리뷰 달았어용
private Long targetId; | ||
|
||
private String 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.
UUID면 char(36)으로 지정하는게 낫지 않을까용
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.
String이 아닌 char 배열을 사용하는게 낫다라는 뜻일까요?
아니면 컬럼의 length를 맞춰주는게 좋겠다 라는 뜻일까요?
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.
length를 맞추는게 좋을 거 같아용
@Query( | ||
"select i from Image i where i.imageType = :imageType and i.targetId = :targetId and i.imageFileExtension = :imageFileExtension order by i.id desc limit 1") | ||
Optional<Image> queryImageKey( | ||
ImageType imageType, Long targetId, ImageFileExtension imageFileExtension); | ||
} |
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.
가장 최근 row를 가져오는 이유는
최근 갱신된 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.
네 맞습니다 presignedUrl을 생성하고 이미지 업로드를 처리하지 않았을 경우 해당 key값은 사용되지 않아서,
가장 최신껄 가져오도록 해놨습니당
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.
LGTM
length를 설정하는 게 필수는 아니여서 지금 코드도 좋아보입니당
1c5a6b5
to
09daed5
Compare
|
🌱 관련 이슈
📌 작업 내용 및 특이사항