Enhance draft attachment uploads and activity video management - #257
Merged
Conversation
…ments [codex] Fix Windows ZIP attachment uploads
…s-plan [codex] Enable draft attachment uploads in Admin
There was a problem hiding this comment.
Pull request overview
이 PR은 (1) 첨부파일 업로드의 draft 세션 지원(게시글 생성 전 업로드/정리/연결)과 (2) ZIP 파일의 Windows 호환성 보정, (3) “활동 영상(Activity Videos)”의 공개/관리 API 및 Admin UI 추가를 통해 콘텐츠 운영 기능을 확장합니다.
Changes:
- Admin 첨부파일 업로드에
draftSessionId를 도입하고, 저장 후 draft 첨부파일을 postId로 연결하는 API/UX 흐름을 추가 - ZIP 업로드 전
ensureWindowsCompatibleZipFile로 UTF-8 파일명 플래그/정규화 및 macOS 메타데이터 엔트리 제거 처리 추가(+ 검증 스크립트) - 활동 영상: Server 컨트롤러/함수 라우트, Cosmos 컨테이너 접근, 시드 스크립트 및 Admin 관리 화면/라우팅을 추가하고 Web 공개 페이지는 API 기반으로 조회
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Elevate.Web/src/pages/ActivityShowcasePage.jsx | 활동 영상 목록을 정적 JSON 대신 공개 API로 조회하고 실패 시 fallback 사용 |
| Elevate.Web/src/api/activityVideos.js | 활동 영상 공개 목록 API 클라이언트 추가 |
| Elevate.Server/tests/config.test.js | activity videos Cosmos 컨테이너 설정 예시 검증 테스트 추가 |
| Elevate.Server/tests/auth-guard.test.js | activity videos Admin 엔드포인트 401 가드 테스트 추가 |
| Elevate.Server/tests/admin-attachments.test.js | draftSessionId 정규화/쿼리/메타 저장/링크 처리에 대한 테스트 추가 |
| Elevate.Server/tests/admin-attachment-download.test.js | 첨부 목록 쿼리 스펙 검증 및 draftSessionId 조회 테스트 추가 |
| Elevate.Server/tests/activity-videos.test.js | 활동 영상 공개/관리 API 동작(필터/CRUD/검증) 테스트 추가 |
| Elevate.Server/tests/activity-video-seed.test.js | 활동 영상 시드 스크립트 유틸/파서/드라이런 테스트 추가 |
| Elevate.Server/src/services/cosmosClient.js | 활동 영상 컨테이너 getter 추가 |
| Elevate.Server/src/functions/publicActivityVideosList.js | 공개 활동 영상 목록 Functions 엔드포인트 추가 |
| Elevate.Server/src/functions/index.js | 신규 Functions 라우트 등록 및 라우트 우선순위 반영 |
| Elevate.Server/src/functions/adminLinkDraftFiles.js | draft 첨부파일을 post에 연결하는 Admin Functions 엔드포인트 추가 |
| Elevate.Server/src/functions/adminActivityVideosList.js | 활동 영상 Admin 목록 Functions 엔드포인트 추가 |
| Elevate.Server/src/functions/adminActivityVideoCreate.js | 활동 영상 Admin 생성 Functions 엔드포인트 추가 |
| Elevate.Server/src/functions/adminActivityVideoDetail.js | 활동 영상 Admin 상세 Functions 엔드포인트 추가 |
| Elevate.Server/src/functions/adminActivityVideoUpdate.js | 활동 영상 Admin 수정 Functions 엔드포인트 추가 |
| Elevate.Server/src/functions/adminActivityVideoDelete.js | 활동 영상 Admin 삭제 Functions 엔드포인트 추가 |
| Elevate.Server/src/controllers/adminController.js | draft 첨부파일 TTL/정리/조회/링크 로직 및 입력 검증 강화 |
| Elevate.Server/src/controllers/activityVideoController.js | 활동 영상 공개/관리 CRUD 컨트롤러 및 입력 검증 추가 |
| Elevate.Server/scripts/seed-activity-videos.js | Web 정적 JSON 기반 시드 업서트 스크립트 추가 |
| Elevate.Server/package.json | 시드 스크립트 npm task 추가 |
| Elevate.Server/local.settings.json.example | 활동 영상 컨테이너 환경변수 예시 추가 |
| Elevate.Admin/src/utils/zipCompat.js | ZIP Windows 호환성 보정 유틸 추가 |
| Elevate.Admin/scripts/test-zip-compat.mjs | ZIP 호환성 보정 유틸 검증 스크립트 추가 |
| Elevate.Admin/src/services/assetsApi.js | register/getFiles 확장(draftSessionId, link-draft) |
| Elevate.Admin/src/components/editor/AttachUploader.jsx | draftSessionId 지원 + ZIP 호환성 처리 + 업로드 상태 콜백 |
| Elevate.Admin/src/components/editor/PostMetaSidebar.jsx | AttachUploader에 draftSessionId/업로드 상태 콜백 전달 |
| Elevate.Admin/src/pages/PostEditor.jsx | draft 첨부파일 세션 생성/저장/연결 재시도 및 저장 UX 개선 |
| Elevate.Admin/src/services/activityVideosApi.js | 활동 영상 Admin API 클라이언트 추가 |
| Elevate.Admin/src/pages/ActivityVideos.jsx | 활동 영상 목록 관리 페이지 추가 |
| Elevate.Admin/src/pages/ActivityVideoEditor.jsx | 활동 영상 생성/편집 페이지 추가 |
| Elevate.Admin/src/components/layout/Sidebar.jsx | 사이드바에 활동 영상 관리 메뉴 추가 |
| Elevate.Admin/src/App.jsx | 활동 영상 라우팅 추가 |
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.
This pull request introduces several new features and improvements, primarily focused on enhancing file attachment support, especially for ZIP files, and adding management for "활동 영상" (Activity Videos). It also improves the handling of draft sessions for attachments and enhances the sidebar navigation. The most important changes are summarized below.
Attachment and ZIP Compatibility Improvements:
test-zip-compat.mjs) to validate and ensure that ZIP files are compatible with Windows, including proper UTF-8 filename handling and filtering of macOS metadata files.AttachUploaderto use the newensureWindowsCompatibleZipFileutility before uploading ZIP files, improving cross-platform compatibility. The uploader now also supports draft session IDs and notifies when uploads are in progress. [1] [2] [3] [4]Draft Session & Attachment Upload Handling:
AttachUploaderandPostMetaSidebarto support bothpostIdanddraftSessionId, allowing attachments to be managed before a post is finalized. Added a callback to notify parent components about the uploading state. [1] [2] [3]Activity Videos Management:
Sidebar Navigation Enhancement: