ca8ee867

By: Michael Lynch <git@mtlynch.io>

Pass a single media file store to the media service

main.go previously built one storage writer but handed it to the media
service through two doors: as the upload processor's writer and as a
separately extracted DeleteFile func. Nothing enforced that the two
referred to the same backend, so a wiring mistake could write uploads to
one store while deleting from another.

Introduce mediastore.FileStore (WriteFile + DeleteFile, which both
LocalWriter and s3.Writer already implement) and thread one value from
main.go into both the upload processor and the media service. This also
lets main.go build the upload processor once instead of once per storage
backend.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codeberg

Suite timing

Time to Start Worker time Duration Time to finish Idle
Config 2s 12s 12s 14s 2s
Eval 10s 38s 38s 48s 0s
Build 28s 5m09s - - 0s
Suite 2s 5m59s - - 10h57m17s