069786dd

Author: Michael Lynch <git@mtlynch.io>

Committer: Michael Lynch <mtlynch@noreply.codeberg.org>

Upload imported media to S3-compatible bucket (#73)

The importer now uploads media files directly to an S3-compatible bucket
(e.g. Backblaze B2) instead of writing them to a local directory. The
server reads an S3 config to construct public media URLs, replacing the
temporary /dev-files/ local file server route.

New --s3-config flag (required) on both the server and importer points to
a JSON file with endpoint, region, bucket, credentials, and an optional
mediaBaseURL. If mediaBaseURL is omitted it defaults to {endpoint}/{bucket}.

The importer writes each media file to a temp file, uploads it via the
AWS SDK v2 S3 client (UsePathStyle=true for B2 compatibility), then
deletes the temp file. The metadata.json output continues to be written
locally via the existing --metadata flag.

A pre-generated testdata/metadata.json is committed so the Nix e2e test
sandbox can start the server without running the importer against a real
S3 bucket (Nix build sandboxes have no network access).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Reviewed-on: https://codeberg.org/mtlynch/little-moments/pulls/73
Co-authored-by: Michael Lynch <git@mtlynch.io>
Co-committed-by: Michael Lynch <git@mtlynch.io>

Suite timing

Time to Start Worker time Duration Time to finish
Config 0s 1s 1s 1s
Eval 1s 45s 45s 46s
Build 3s 1m43s 14s 17s
Test - - - -
Deploy - - - -
Suite 0s 2m30s 46s 46s

Timeline

0s10s20s30s40s