b945dcb6

By: Michael Lynch <git@mtlynch.io>

Separate image and video upload paths

Remove the generic uploadPost dispatcher and the uploadParser/publishFunc
function-type indirection that existed only to share code between the image
and video routes. Each route is now a self-contained handler read top to
bottom.

Split uploadPostRequest into imageUploadPostRequest (carrying an open
io.ReadCloser, as on master) and videoUploadPostRequest (carrying a temp
path, since its parser streams the multipart body to disk). The video struct
drops MediaType, which is always video.

Each parser now accepts only the formats its route serves: photoTypeFromFilename
for the image route, requireVideoFilename for the video route, replacing the
shared mediaTypeFromFilename and the awkward post-parse video rejection.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

Suite timing

Time to Start Worker time Duration Time to finish
Config 1m46s 10s 10s 1m56s
Eval 1m57s 3m06s 3m06s 5m04s
Build 2m18s 10m12s 3m43s 6m01s
Suite 1m46s 13m29s 4m15s 6m01s

Timeline

0s2m2m20s2m40s3m3m20s3m40s4m4m20s4m40s5m5m20s5m40s6m