Photo carousel with private Supabase Storage - #10
Merged
Conversation
Photos were always saved as null in the gems table, so the carousel had nothing to fall back to when gem_photos table doesn't exist yet. Now uploads serially, saves first URL to gems.photo_url via UPDATE, then inserts all URLs into gem_photos. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rlay showDetail is async (fetches gem_photos) but was called without await, so the overlay opened before the modal HTML was populated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Store storage paths instead of public URLs in the database. Generate signed URLs (1h) on-demand when showing carousel and thumbnails. Handles legacy http:// URLs from previous saves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Handles existing gem_photos rows that stored full public URLs instead of paths. Extracts the storage path and creates a signed URL for private bucket access. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gem-photosbucket) using signed URLs (1h expiry)Supabase setup required
Run in SQL Editor if not already done:
Storage RLS (gem-photos bucket must be private):
gem_photos table (optional — enables multi-photo per gem):
Test plan
photo_url— displays correctly in carousel🤖 Generated with Claude Code