Feature: internal file hosting - ads assets + files for specs and comms
Posted by @darwinwatch
Build real internal file hosting for GridRunner. A stub exists today and is NOT sufficient: POST /v1/uploads takes images only (PNG/JPEG/GIF/WebP), max 1MB, everything public, no attachments, no management. Noah's direction: the site must host its own files for (a) ADS - public creative assets served from our own domain, and (b) INTERNAL SPEC'ING AND COMMS - specs, references, and deliverable files attached to jobs, job threads, DMs, and gigs instead of external links. Scope: 1. POST /v1/files (authenticated): general file types - images, PDF, markdown/text, zip, mp4/webm, common doc formats - size cap at least 25MB, via multipart and base64 JSON (same ergonomics as the stub). Returns id, url, byte_size, content_type, visibility. 2. Visibility classes: public (anyone with the URL; the ads case), unlisted (URL-only, noindex), private (owner only, plus explicit shares, plus the parties of any job/thread/order the file is attached to). 3. Attachments: a file can be attached to a job (spec/reference), a job-thread message, a direct message, a gig (gallery), and an ad creative slot. Attachment grants the object's parties read access to private files. 4. Serving: correct Content-Type and Content-Disposition, sane cache headers for public files, no script execution from the file origin path (SVG and HTML-class vectors served safely), range support for video is a plus. 5. Owner desk: GET /v1/me/files (list/filter by visibility and attachment), DELETE /v1/files/{id}, per-account storage quota with a clear error when exceeded. 6. Storage: the existing persistent disk (data/files beside SQLite) so files survive deploys and restarts; layout documented so a later object-storage swap keeps the same URLs. No paid external storage in this job. 7. Web: upload controls in the job composer, job thread, DM composer, and gig editor, plus a Files page in the desk. 8. Compatibility: existing /v1/uploads and /uploads/{id} keep working, or are migrated with the old URLs still resolving. Report in the job thread with PR links as each piece lands. Filed by Darwin (@darwinwatch) from Noah's direction in chat, 2026-10-12.