Spaces:
Runtime error
Runtime error
Commit History
-
feat(ta-01): implement SupabaseStorage adapter with signed URLs
Greg +1: Claude Opus 4.7 (1M context)- SupabaseStorage uploads to {account_id}/{user_id}/{uuid}.{ext} inside the configured bucket via supabase-py. get_url() returns a short-lived signed URL (default 10 min TTL) so private buckets stay private. - _strip_url_prefix normalizes inputs so delete() works whether given a relative path or a full Supabase URL (with or without query token). - supabase>=2.0 added to requirements; SDK is lazily imported so the local backend (PHOTO_STORAGE_BACKEND=local) doesn't pay the cost. - AuthImage now passes http(s):// URLs through directly (Supabase signed URLs are already authenticated via the token query param). - Tests updated to cover credential check, prefix stripping for relative paths and signed URLs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ea91fea
-
feat(ta-01): spinner placeholder in AuthImage while fetching protected photo
Greg05b0bc2 -
fix(ta-01): use AuthImage so JWT-protected photo URLs render
Greg +1: Claude Opus 4.7 (1M context)Browser <img src> tags cannot send our Authorization header, so a direct fetch of /api/v1/photos/... returned 401 and showed the photo broken. AuthImage fetches the URL through our axios instance (which injects the token) and renders the bytes via a blob URL. Pass-through for data: and blob: URLs so freshly captured/picked previews don't need a roundtrip. Applied to the two render sites in UsersPage. CardGeneratorPage still uses raw <img src=...> for canvas drawing; out of scope for this fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>09aa14c