7ebce793

By: Michael Lynch <git@mtlynch.io>

Centralize media publication

Extract the process-then-insert-then-redirect orchestration out of
handlers/upload.go into a new media.Service, so handlers depend only on a
two-method MediaPublisher interface instead of constructing MediaItems and
calling the store directly. Keeps the load-bearing comments explaining why
files are written before the DB row (orphaned files vs. broken gallery
entries) and the EXIF PublishTime TODO, and drops the redundant media-type
validation in PublishImage since uploads.ProcessImage already rejects
unsupported types.