feat(routes): add short /file/video/:id alias for video stream

외부 공유용으로 더 짧은 영상 파일 URL 을 제공:
  /file/video/:videoId   ← 신규 (영상 주소 복사 결과)
  /api/video/:videoId/file ← 호환용 alias 로 유지 (기존 링크 안 깨지게)
  /api/video/:videoId     ← 메타 JSON (변경 없음)

핸들러는 한 함수를 두 라우트에 공유. 우클릭 "영상 주소 복사" 가
이제 새 짧은 경로를 클립보드에 넣음.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-15 21:58:37 +09:00
parent 25a809546e
commit 59f96a12a6
3 changed files with 13 additions and 8 deletions

View File

@@ -34,7 +34,7 @@
})
function copyVideoUrl(id) {
var url = location.origin + '/api/video/' + encodeURIComponent(id) + '/file'
var url = location.origin + '/file/video/' + encodeURIComponent(id)
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(url).then(function () {
flashToast('주소가 복사되었습니다.')