issue#91 게시글 작성/수정 페이지 이미지 업로드 오류 수정#92
Merged
gogumalatte merged 3 commits intodevelopfrom Feb 25, 2025
Merged
Conversation
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 상세 내용
이미지(파일) 업로드 시 데이터베이스에 이미지가 쌓이게 됨 -> 근데 이 이미지를 업로드 후 프론트 단에서 백스페이스 키를 눌러서 지우더라도 db에서는 실제로 지워지지 않음 -> 파일이 너무 많이 쓰이면 용량 부족, 과금 등의 문제가 발생할 수도 있기 때문에, db에서도 지우기 위해 각 이미지마다 storageId를 할당하여 적용하기로 함.
게시글 작성 페이지가 랜더링될 때 api 통신으로 storageId를 받아옴. 이를 변수에 저장하여 이미지 업로드 시 함께 전달하고, 게시글 저장 시에도 body에 담아 함께 전달함. 이제 게시글을 삭제하면 해당 게시글에서 업로드를 했던 모든 사진들이 함께 삭제된다.
게시글이 저장되기 전까지는 postId가 없기 때문에 storageId라는 새로운 값을 사용함.
#️⃣ 이슈 번호
close #91
💬 리뷰 요구사항
⏰ 현재 버그
📷 스크린샷(선택)
🔗 참고 자료(선택)