How it works
The client asks the API to create an upload. After authentication, quota, and size checks, the API creates a pending video record and issues a short-lived permission scoped to one object key, such as an Amazon S3 presigned URL. The client sends the file directly to object storage, so large bytes never tie up API servers. The API records the owner and expected object so a guessed key cannot publish someone else’s upload.
For unstable networks, use multipart or resumable uploads, which send a file as separately retried pieces, with checksums (short fingerprints that reveal corrupted bytes) and a completion step. Take a 2 GB source in 10 MB parts: 200 parts. If the connection dies after part 150, the client resends the last 50, or 500 MB, rather than 2 GB. S3 offers multipart uploads, and tus is an open protocol for the same job.
Parts are byte ranges; they need not match codec Groups of Pictures, the runs of frames that begin with one decodable on its own. When storage confirms a complete object, verify size, checksum, and media type before processing. Retry the same upload session to avoid duplicates. A “received” response means the original is durable, not that playback is ready.
Expire abandoned sessions and parts, since S3 keeps billing for parts of an unfinished upload until they are aborted, which a lifecycle rule can do automatically. Resumable flows also add client code and session state. A 5 MB profile clip is better served by one plain PUT.
A 900 MB upload stops at 85%. How can the creator continue without sending the first 85% again?
Resume missing byte ranges in the same session, verify the assembled object, and finalize the existing pending video.
Use this as a guide for self review; written answers are not graded.Keep in mind
- Authorize a narrow direct upload, then verify the stored object.
- Keep upload completion distinct from playable publication.