Spaces:
Runtime error
Runtime error
Commit History
-
feat(ta-01): backend-proxy photo URLs so they stop expiring
Greg +1: Claude Opus 4.7 (1M context)Frontend now receives stable /api/v1/photos/{account_id}/{user_id}/{filename} URLs for face photos, regardless of which storage backend is active. The serve_photo endpoint authenticates against our own JWT and streams the bytes from disk (local) or Supabase (S3 via boto3.get_object). Browser caches the response privately for 5 minutes so re-renders don't hit the backend. This eliminates the 10-min signed-URL expiry pain — the URL never changes and never goes stale. Same behavior on the local-disk dev backend and on Supabase in prod. - PhotoStorage Protocol gains fetch_bytes(path) -> (bytes, content_type). - Implemented on all three adapters (Local, InMemory, Supabase). - serve_photo routes through the protocol; per-backend logic moves there. - users.py response mapping and the upload endpoint return the proxied URL instead of storage.get_url() so legacy signed URLs are gone. Tests: 22 passed (storage + photo upload), no regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <n…8ca1e92
-
feat(ta-01): add PhotoStorage abstraction with Local/InMemory/Supabase adapters
Greg +1: Claude Sonnet 4.6Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9e5f651