- Update Firebase service to use clean GCS URLs instead of MediaLink - Set ACL to make uploaded files publicly accessible - Use slug as image filename to prevent overwrites - Add unique constraints on slug columns in books and stationery tables - Add slug existence checks before upload (409 Conflict if duplicate) - Update storage paths: /jd-bookshop/books and /jd-bookshop/stationery - Remove year/month from storage paths as requested - Construct URLs: https://storage.googleapis.com/{bucket}/{encoded-path} Changes: - firebase.go: Set ACL, construct clean URLs using url.PathEscape - book.go & stationery.go: Check slug before upload, use correct paths - book_service.go & stationery_service.go: Add slug existence check functions - migration: Add UNIQUE constraints on slug columns
4.2 KiB
4.2 KiB