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.
Pull request
Related issue
#275
Motivation and context
청크 업로드를 구현하였는데, 기존 통 업로드 방식과 비교해 눈에 띄는 개선이 나타나지 않았습니다.
Solution
비동기 처리와 멀티스레딩을 도입하였습니다.
받은 청크를 비동기로 s3에 업로드합니다. 기존 방식은 청크를 다 받고, 병합하고, 업로드하는 방식이었는데 병합 과정이 빠지고, 비동기 방식이 도입되었습니다.
각 청크가 업로드되면 s3에서 서버로 etag가 반환되는데 이를 비롯한 파일의 메타데이터를 서버가 저장하면서 업로드된 청크의 상태를 추척합니다.
모든 청크 업로드가 완료되면 메타데이터를 활용해 s3에 병합 요청을 보내고, 파일 mimeType을 추가로 설정합니다.
위의 로직에 맞게 init-upload api를 보완하였습니다.
How has this been tested
Types of changes
Checklist