diff --git a/README.md b/README.md index bde8e37..626b75f 100644 --- a/README.md +++ b/README.md @@ -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` — 폴더 목록 (로그인 필요) diff --git a/src/routes/public.ts b/src/routes/public.ts index 4126c60..7b46d8c 100644 --- a/src/routes/public.ts +++ b/src/routes/public.ts @@ -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) {