-
Stefy Lanza (nextime / spora ) authored
Uploads were read in the browser with FileReader, base64'd, and posted as one JSON document holding every source — so a phone video was a ~700 MB string in the browser, another copy in the request, and another in the handler, and nginx's 1 MB default rejected it long before any of that mattered. Now the browser POSTs each File as a raw body to /api/upload, which streams it to disk a megabyte at a time and hands back a path; extraction takes paths. Nothing base64s client-side, and neither end ever holds a whole file. JSON bodies are capped at 32 MB (they only carry settings now) and the upload endpoint is dispatched before the body is parsed, since it is binary. Big videos are also frame-sampled LOCALLY before anything is sent: the extractor only ever looks at evenly-spaced frames, so shipping 24 of them instead of the film is the same result for a fraction of the traffic (--max-upload-mb, default 64; 0 sends the file). Oversized stills are downscaled to 2048px, and voice cloning now sends a 90s mono clip rather than the entire soundtrack. Co-Authored-By:
Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0182DhR1eFNPQyGmDrpHbedY
fbd20544