-
Notifications
You must be signed in to change notification settings - Fork 2
Fix: 프론트 요청사항에 따른 파일 업로드 기능 수정 (#244) #256
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
Merged
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
- 기존: 파일 정보 + 엔티티 타입 + 해당 엔티티의 아이디 - 변경: 유저 + 파일 정보
- 요청 데이터 변경에 따른 로직 변경
- 기존: publicURL - 변경: attachmentId + publicURL
- 파일 업로드 요청 및 응답 데이터 변경에 따른 컨트롤러 메서드 변경
- 기존 : filePath - 변경 : publicURL
- 기존: /api/file/read?entityType=POST&entityId=1
- 변경: /api/file/read/{attachmentId}
- 엔드 포인트 변경에 따른 파일 조회 비즈니스 로직 변경
- 기존 : /api/file/update
- 변경 : /api/file/update/{attachmentId}
- 엔드 포인트 변경에 따른 파일 수정 컨트롤러 메서드 변경
- 엔드 포인트 변경에 따른 파일 수정 로직 변경
- 기존: null - 변경: publicURL
- 기존: /api/file/delete?entityType=POST&entityId=1
- 변경: /api/file/delete/{attachmentId}
- 엔드 포인트 변경에 따른 파일 삭제 로직 변경
- AttachmentMappingRepository 삭제 - getFileAttachmentOrThrow(AttachmentMapping으로부터 파일정보 추출하는 함수) 삭제
- 파일 서비스 변경에 따른 테스트 수정
- 기존: imageUrl = "S3 퍼블릭 URL" - 변경: publicURL = "S3 퍼블릭 URL"
joyewon0705
approved these changes
Oct 13, 2025
jueunk617
approved these changes
Oct 13, 2025
기존 : "!=" 비교 변경 : "equals" 비교
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.
📌 개요
🔨 작업 내용
🆙 파일 업로드 (POST /api/file/upload)
요청 데이터 변경
파일 정보 + 엔티티 타입 + 해당 엔티티의 아이디유저 + 파일 정보만 전달응답 데이터 변경
publicURL만 반환attachmentId + publicURL반환🧾 파일 조회 (GET /api/file/read/{attachmentId})
엔드포인트 변경
/api/file/read?entityType=POST&entityId=1/api/file/read/{attachmentId}요청 데이터 변경
엔티티 타입 + 해당 엔티티의 아이디유저 + attachmentId응답 데이터
🔁 파일 수정 (PUT /api/file/update/{attachmentId})
엔드포인트 변경
/api/file/update/api/file/update/{attachmentId}응답 데이터 변경
null반환publicURL반환 (수정된 파일의 새 URL)🗑️ 파일 삭제 (DELETE /api/file/delete/{attachmentId})
/api/file/delete?entityType=POST&entityId=1/api/file/delete/{attachmentId}🔗 관련 이슈
Closes #244
📝 참고 사항
✅ 체크리스트