feature/clean-public-urls #1

Merged
admin merged 6 commits from feature/clean-public-urls into main 2025-11-21 12:14:34 +00:00
Owner
No description provided.
admin added 6 commits 2025-11-21 12:14:12 +00:00
- 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
- Added .gitea/workflows/deploy.yml and .gitea/workflows/build.yml to .gitignore to prevent tracking of workflow configuration files.
- Cleaned up the .gitea/workflows/test.yml file by removing an extra blank line for better readability.
- Updated the heading from "Related Documentation" to "Related Documentations" for consistency in the .gitea/workflows/README.md file.
- Added .gitea/workflows/deploy.yml and .gitea/workflows/build.yml to .gitignore to prevent tracking of these workflow configuration files.
admin merged commit a43658af84 into main 2025-11-21 12:14:34 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/jd-book-uploader-backend#1