Skip to content

feat: 分享链接 (share links)#16

Merged
BH3GEI merged 1 commit into
mainfrom
feat/16-share-links
May 23, 2026
Merged

feat: 分享链接 (share links)#16
BH3GEI merged 1 commit into
mainfrom
feat/16-share-links

Conversation

@BH3GEI

@BH3GEI BH3GEI commented May 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Backend: shared/ directory for persisted videos with 7-day auto-cleanup
  • POST /api/share: upload video blob, returns share_id
  • GET /api/shared/{share_id}: serve saved mp4 with CDN cache headers
  • Path traversal protection, file size validation (500B-50MB)
  • Frontend: share button (blue, next to download) appears after video generation
  • Uploads current video blob to /api/share, copies shareable URL to clipboard
  • Toast notification "链接已复制"

Test plan

  • POST /api/share with mp4 returns share_id
  • GET /api/shared/{id} returns correct video (size verified)
  • Non-existent share_id returns 404
  • Frontend JS includes share handler and clipboard logic
  • Share button CSS renders correctly

- Backend: shared/ directory for persisted video files
- POST /api/share: upload video blob, returns share_id
- GET /api/shared/{share_id}: serve saved mp4
- Lazy cleanup of files older than 7 days on each request
- Path traversal protection via sanitized share_id
- Frontend: share button next to download (appears after generation)
- Uploads video blob, copies share URL to clipboard
- Toast "链接已复制" on success
- CSS v24
Copilot AI review requested due to automatic review settings May 23, 2026 05:52
@BH3GEI BH3GEI merged commit 06800fc into main May 23, 2026
@BH3GEI BH3GEI removed the request for review from Copilot May 23, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant