Skip to content
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

파일 청크 업로드 비동기 도입 #279

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

mirlee0304
Copy link
Member

@mirlee0304 mirlee0304 commented Feb 23, 2025

Pull request

Related issue

#275

Motivation and context

청크 업로드를 구현하였는데, 기존 통 업로드 방식과 비교해 눈에 띄는 개선이 나타나지 않았습니다.

Solution

비동기 처리와 멀티스레딩을 도입하였습니다.
받은 청크를 비동기로 s3에 업로드합니다. 기존 방식은 청크를 다 받고, 병합하고, 업로드하는 방식이었는데 병합 과정이 빠지고, 비동기 방식이 도입되었습니다.
각 청크가 업로드되면 s3에서 서버로 etag가 반환되는데 이를 비롯한 파일의 메타데이터를 서버가 저장하면서 업로드된 청크의 상태를 추척합니다.
모든 청크 업로드가 완료되면 메타데이터를 활용해 s3에 병합 요청을 보내고, 파일 mimeType을 추가로 설정합니다.

위의 로직에 맞게 init-upload api를 보완하였습니다.

How has this been tested

스크린샷 2025-02-24 오전 12 09 23 스크린샷 2025-02-24 오전 12 09 08

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the docs/CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Sorry, something went wrong.

Copy link

netlify bot commented Feb 23, 2025

Deploy Preview for jootalkpia canceled.

Name Link
🔨 Latest commit 4fb56ec
🔍 Latest deploy log https://app.netlify.com/sites/jootalkpia/deploys/67bfcb712aeaec00081e0a0b

@mirlee0304 mirlee0304 self-assigned this Feb 23, 2025
@mirlee0304 mirlee0304 added ✨ Feature 기능 추가 🎮 BE 백엔드 무조건 스프린트내에 해야하는 것들 labels Feb 23, 2025
@mirlee0304 mirlee0304 added this to the 주톡피아 마일스톤3 milestone Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feature 기능 추가 무조건 스프린트내에 해야하는 것들 🎮 BE 백엔드
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant