feat: Media captures its upload filename as a required display label #193
No reviewers
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier!193
Loading…
Reference in a new issue
No description provided.
Delete branch "media/upload-filename-label"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Every upload now carries the filename its file part was submitted under, parsed into a
MediaFilenamevalue type (basename only, trimmed, capped at 255 chars on a char boundary) and stored as an opaque display label for the Library and picker to render.Deviating from the ticket's optional-label design by agreement: the filename is required. A file part with no usable filename is rejected with a 400 at both upload adapters — the post editor's multipart extractor and the Micropub media endpoint (
invalid_request) — so a nameless Media cannot exist and nothing downstream handles the absent case. The web extractor hands handlers an already-parsedPhotoUpload, andPhotoAction::Replacecarries it, so the handlers can't get it wrong.NOT NULLfilenamecolumn; pre-existing dev rows are backfilled with their hex id so reads stay valid.Closes #189