📚 Encyclopedia

Web Development · updated 2026-11-23

Upload links for people without an account (getting a full-quality video from a friend)

uploadsvideoobject-storagepresigned-urlsmultipartcapability-urlsharingux

Text messages, chat apps and email all re-compress or cap video, so "just send it to me" loses the resolution. For a sender who is not technical, the lowest-friction fix is a link they tap that opens a page with one button. This describes that feature as built on a personal video site (a "drop link"), and what its first real use taught.

Without building anything

The built version is worth it when the same person will send more than once, or when even "make a link" is too many steps.

The shape of the feature

The first real use failed

A friend on Chrome for Android picked a 181 MB video. The upload was created, then every slice failed instantly and the page showed "Connection hiccup, trying again" at 0% until it gave up. The cause was never identified, because the page had not recorded one. The two candidates that fail instantly:

What was added, and what any such page should have from the start:

  1. A relay route. After two direct failures, slices are posted to the site's own server, which forwards each to storage with the same multipart upload. Slower, and the server holds one slice in memory, but it works wherever the site itself is reachable. The relay endpoint needs a raised request body limit for that one path only (an nginx location = block with client_max_body_size), leaving the rest of the site at its small default (nginx in front of Apache (TLS proxy on :8008)).
  2. Read before sending. Read each slice into memory first, so a file that cannot be read is told apart from a network failure and gets its own message: download the video to the phone, then choose it again.
  3. A failure log. The page reports why a slice failed to the server (time, link, browser, reason; a size-capped file). Without it, a remote failure on someone else's phone is unknowable. Read that log first next time.

A generic "trying again" loop is the wrong default for a non-technical sender: they see a stuck bar and give up, and the owner learns nothing.

Testing the fallback

Headless Chrome can make one host unreachable with --host-resolver-rules="MAP <storage-host> 0.0.0.0", which forces the relay path on a machine where the direct path works. Compare the sha256 of what arrives with the source file on both routes (Headless Chrome testing gotchas).

Sharing what was received

A second token per file gives a public page with the site's normal player and a "Download original" button. The same file always gets the same address; turning sharing off or deleting the file ends it; the upload link's expiry does not.

Open questions

See also

Linked from

Sources: justinahampton memory (videos-drop-links), tldr posts #1905, #1907, #1910 (2026-11-19)