feat: E2 — Upload & Encoding Pipeline ## Goal A creator can upload a v - #353
Closed
fly-productivity-manager[bot] wants to merge 1 commit into
Closed
feat: E2 — Upload & Encoding Pipeline
## Goal
A creator can upload a v#353fly-productivity-manager[bot] wants to merge 1 commit into
fly-productivity-manager[bot] wants to merge 1 commit into
Conversation
## Goal A creator can upload a v [fly-dev run run_c7575a04f9594c32bad77c260aefb6bd]
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
editor | eeb1e6a | Aug 17 2026, 07:46 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
spooool | eeb1e6a | Aug 17 2026, 07:46 AM |
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.
Summary
Here's a summary of every change made for E2:
Changes
src/workers/upload-validation.tsuploadId format gate —
chunkMetadataSchemanow validatesuploadIdagainst/^[A-Za-z0-9_-]{1,64}$/. Path-traversal attempts (../,has/slash, etc.) are rejected at parse time on both video and recorder paths, not just recorder.src/workers/videos.tsThree independent fixes:
Missing fields in video responses —
GET /api/videos/:idSELECT now includesv.playback_hls_urlandv.thumbnail_url;CachedVideoMetatype updated to match.GET /api/videoslist now includesthumbnail_url. Before this fix, thumbnails wouldn't render in feeds or channel pages because the field was stored in D1 but never returned.KV sentinel ordering — The done-sentinel (
upload-done:{userId}:{uploadId}) is now written before the session KV keys are deleted, not after. If a network drop happened between the delete and the sentinel write, a final-chunk retry would get a 400 with no session and no sentinel. Now the worst case is the session keys linger briefly (harmless, TTL cleans them).Early total-size check for multipart uploads — At chunk-0,
validateInitialFileis now called withtotalSize = rawFile.size × chunkCountas a conservative upper bound. Previously the server had no early gate for multipart uploads — a client could sendchunkCount=3072chunks of 50 MB each (150 GB) before the per-chunk running accumulator finally rejected it. Thefile_too_largeerror is now returned immediately at chunk-0.src/workers/upload-validation.test.tsNew tests for the
uploadIdformat validation: accepts valid UUID, rejects path-traversal values, rejects IDs longer than 64 chars.src/workers/videos.test.tsNew test:
GET /api/videos/:idresponse includesthumbnail_urlandplayback_hls_url.Tests
Opened automatically by fly-dev run run_c7575a04f9594c32bad77c260aefb6bd.