Skip to content

[#32] [Feat] S3 DOCX 다운로드 및 변환된 PDF 업로드 구현 - #33

Merged
snowballourown merged 3 commits into
feature/30from
feature/32
Nov 19, 2026
Merged

snowballourown merged 3 commits into
feature/30from
feature/32

Conversation

@snowballourown

Copy link
Copy Markdown
Collaborator

변경 내용

S3에 저장된 DOCX를 다운로드하고, WordPdfConverter로 변환한 PDF를 S3에 업로드하도록 연결했습니다.

  • S3ObjectReader.downloadDocx() 추가: DOCX 다운로드 및 최대 20MiB 제한
  • DocumentStorageKeyGenerator.generatePdf() 추가: 원본과 구분되는 PDF 저장 키 생성
  • S3PdfWriter.upload() 추가: 최대 64MiB PDF를 application/pdf로 업로드
  • If-None-Match: *로 같은 저장 키의 파일 덮어쓰기 방지
  • DocumentConversionService.convertAndStore()에서 다운로드·변환·업로드 연결
  • 업로드 성공 후 StoredPdf(objectKey, sizeBytes, pageCount) 반환
  • 외부 통신 중 호출자의 DB 트랜잭션을 유지하지 않도록 설정

처리 흐름

  1. convertAndStore(workspaceId, originalObjectKey)를 호출합니다.
  2. S3ObjectReader.downloadDocx()가 S3에서 DOCX를 다운로드합니다.
  3. WordPdfConverter.convert()가 DOCX를 PDF로 변환하고 검사합니다.
  4. S3PdfWriter.upload()가 새로운 저장 키로 PDF를 업로드합니다.
  5. PDF 저장 키·크기·페이지 수를 StoredPdf로 반환합니다.

이번 PR에는 API·스케줄러 연결, StoreFile DB 저장, DocumentUpload.reviewPdfFile 연결을 포함하지 않습니다.

선행 PR

관련 이슈

Closes #32

@snowballourown
snowballourown added this pull request to stack #23 November 8, 2026 09:14
@snowballourown snowballourown linked an issue Nov 8, 2026 that may be closed by this pull request
6 tasks
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 30699940-196f-40c3-ba45-29a5ff95e658
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@snowballourown
snowballourown merged commit e54e900 into main Nov 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] S3 DOCX 다운로드 및 변환된 PDF 업로드 구현

1 participant