docs: 레거시 ID-only URL 문서/주석을 실제 동작에 맞게 정정

- README: 제거된 /api/video/:videoId/file 안내 삭제, /file/video/:videoId 만
  레거시 주소로 남기고 전역 유일할 때만 200 임을 명시
- public.ts 썸네일 fallback 주석을 "전역 첫 매치" → "전역에서 유일한 경우만"

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
Claude (owner)
2026-06-06 16:37:59 +09:00
parent ff78b60a4b
commit 03e97d771d
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ data/
- `/folder/:topName/:subName` — 2단계 폴더 (영상만 표시, 더 깊이 들어갈 수 없음)
- `/video/:topName/:videoId` 또는 `/video/:topName/:subName/:videoId` — 외부 공유용 짧은 URL. 경로의 폴더 부분이 영상 위치와 일치할 때만 200.
- `/api/video/:topName[/:subName]/:videoId` — 실제 파일 스트림 (정규). 재생 페이지와 동일한 폴더 경로 규칙으로, 경로가 영상 위치와 일치할 때만 200. `?edited=0` 으로 원본 강제.
- `/file/video/:videoId`, `/api/video/:videoId/file` — ID 기반 파일 스트림 (레거시·외부 공유 호환).
- `/file/video/:videoId` — ID 기반 파일 스트림 (레거시·외부 공유 호환). ID 가 전역에서 유일할 때만 200, 여러 폴더에 같은 ID 가 있으면 404.
관리자(`/op`):
- `/op` — 폴더 목록 (로그인 필요)

View File

@@ -182,7 +182,7 @@ const thumbByPathHandler: RequestHandler = (req, res, next) => {
publicRouter.get('/file/video/:topName/:videoId/thumb', thumbByPathHandler)
publicRouter.get('/file/video/:topName/:subName/:videoId/thumb', thumbByPathHandler)
/** ID-only 레거시 썸네일 fallback (전역 첫 매치). */
/** ID-only 레거시 썸네일 fallback (전역에서 유일한 경우만, 중복이면 404). */
const thumbHandler: RequestHandler = (req, res, next) => {
const video = getVideoByIdGlobal(req.params.videoId)
if (!video) {