Conversation
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.
📋 PR 개요
사용자가 자신이 업로드한 파일의 내용을 조회하고, 파일을 영구적으로 삭제할 수 있는 기능을 구현합니다.
💻 주요 변경 사항
S3 통신 계층 (
S3Uploader):getFileContent메소드를 추가하여, S3에서 특정 파일의 내용을 UTF-8 문자열로 읽어오는 기능을 구현했습니다.deleteFile메소드를 추가하여, S3에서 특정 객체를 삭제하는 기능을 구현했습니다.서비스 로직 (
FileService):getFileContent비즈니스 로직을 구현하여, 파일 소유주를 확인한 후S3Uploader를 통해 파일 내용을 반환하도록 했습니다.deleteFile비즈니스 로직을 구현하여, 파일 소유주를 확인한 후S3Uploader를 통해 S3 파일을 먼저 삭제하고, 그 다음에 DB의 메타데이터를 삭제하도록 구현했습니다.findAndVerifyOwnerprivate 헬퍼 메소드를 추가하여, 여러 메소드에서 사용되는 권한 검사 로직을 중앙화하고 코드 중복을 제거했습니다.API 엔드포인트 (
FileController):GET /api/file/{fileUUID}/content엔드포인트를 추가하여 파일 내용을 조회할 수 있도록 했습니다.DELETE /api/file/{fileUUID}엔드포인트를 추가하여 파일을 삭제할 수 있도록 했습니다.🔗 관련 이슈