Repository navigation
[BE-referral] 추천 이력서 업로드 URL 발급 및 업로드 확인 - #32
Merged
Merged
Conversation
- POST /referral/resumes/presigned-url (대표): presigned PUT 10분, Content-Type·Content-Length 서명 포함
- 403 FORBIDDEN / CONSENT_NOT_GIVEN, 415 UNSUPPORTED_FILE_TYPE(PDF·DOCX 외), 413 FILE_TOO_LARGE(10MB 초과)
- 객체 키 referral-resumes/{companyId}/{uuid}/{경로 문자 제거한 파일명}, DB 저장 후 presign
- 버킷 미설정 시 503 STORAGE_NOT_CONFIGURED (메타데이터 저장 전 차단)
- ResumeService.confirmUploaded: 404 RESUME_NOT_FOUND, 422 RESUME_NOT_UPLOADED, 422 RESUME_MISMATCH, 통과 시 uploadedAt 기록
- StorageService(S3 호환, endpoint 설정형 — AWS/OCI 팀 확인 필요): presignPut·presignGet·headObject
- 의존성 추가: @aws-sdk/client-s3, @aws-sdk/s3-request-presigner / .env.example에 STORAGE_* 추가
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
💡 개요
추천 게시물에 첨부할 이력서를 객체 스토리지에 직접 올릴 수 있도록 업로드 URL을 발급하고, 실제 업로드 여부를 확인하는 기능을 추가합니다.
Closes #17
📌 변경 사항
POST /referral/resumes/presigned-url(대표): 이력서 업로드 URL 발급referral-resumes/{companyId}/{uuid}/{파일명}(경로 문자 제거)uploadedAt=null, 업로드 미확인 상태)ResumeService.confirmUploaded: 게시물 작성 시([BE-referral] 인재 추천 게시물 CRUD API #18) 실제 업로드 여부·크기·형식 확인StorageService: S3 호환 스토리지 연결 (엔드포인트 설정형, AWS·OCI 모두 가능)@aws-sdk/client-s3,@aws-sdk/s3-request-presigner.env.example에STORAGE_*항목 추가 (기존 줄 변경 없음)📖 프론트 참고
uploadUrl로 PUT 요청, 헤더Content-Type은 발급 때 보낸 값과 같아야 함UNSUPPORTED_FILE_TYPEFILE_TOO_LARGECONSENT_NOT_GIVENRESUME_NOT_FOUND(404),RESUME_NOT_UPLOADED(422),RESUME_MISMATCH(422): 업로드 확인용, [BE-referral] 인재 추천 게시물 CRUD API #18 게시물 작성에서 사용STORAGE_NOT_CONFIGURED(503): 스토리지 미설정 시 메타데이터 저장 전 차단EMPLOYEE_NOT_FOUND(404)❓ 확인 필요
🛠 머지 후 팀 작업
npm ci --legacy-peer-deps(패키지 추가됨).env에STORAGE_*설정 (비어 있으면 업로드 URL 발급이 503)✅ 검증