Skip to content

Conversation

@hey-sung
Copy link
Contributor

@hey-sung hey-sung commented Jan 6, 2025

PR 타입(하나 이상의 PR 타입을 선택해주세요)

☑ 기능 추가
□ 기능 삭제
□ 버그 수정
□ 의존성, 환경 변수, 빌드 관련 코드 업데이트


반영 브랜치

refactor/270-file-response-fields -> main


변경 사항

Local 버전과 Production 버전에 따라 파일을 처리하는 로직을 분리합니다.
Local 버전에서도 기존에 파일 URI를 반환하던 방식에서 Base64로 인코딩 한 문자열을 반환하는 방식으로 변경합니다.
Production 버전에서는 이전 방식에서 변경하지 않습니다.

작업 상세 내용

  • FileReponse 응답 데이터 구조 변경
    • 필드 중 하나인 accessURI를 source로 변경
    • 파일 응답 데이터가 Local인지 Production인지 구분하는 Environment 필드 추가
  • Local 버전에서는 source 필드에 Base64로 인코딩한 문자열을 반환하도록 변경

테스트 결과

image


연관된 이슈

#270


리뷰 요구사항(선택)

-  yml 파일의 값을 읽은 후, 로컬/프로덕션 버전 정보를 저장하는 클래스 작성
- accessURI를 source로 변경
- 파일 버전 정보(environment) 추가 - LOCAL / PROD
- PK 관련 에러 수정
- LOCAL 버전의 경우 파일을 다운로드 받아 BASE64로 인코딩한 문자열을 반환하도록 변경
- PROD 버전의 경우 파일에 접근할 수 있는 URI 반환
@hey-sung hey-sung added ⚙️ refactor 리팩토링 🧑🏻‍💻 BE 백엔드 관련 코드 labels Jan 6, 2025
@hey-sung hey-sung requested a review from kimdozzi January 6, 2025 01:58
@hey-sung hey-sung self-assigned this Jan 6, 2025
@hey-sung hey-sung linked an issue Jan 6, 2025 that may be closed by this pull request
4 tasks
@github-actions
Copy link

github-actions bot commented Jan 6, 2025

Test Results

192 files  192 suites   31s ⏱️
293 tests 293 ✅ 0 💤 0 ❌
301 runs  301 ✅ 0 💤 0 ❌

Results for commit f785169.

@hey-sung hey-sung merged commit 3712faa into main Jan 6, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧑🏻‍💻 BE 백엔드 관련 코드 ⚙️ refactor 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[REFACTOR] 파일 시스템 버전에 따른 로직 분리

2 participants