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

6 Commits

Author SHA1 Message Date
ca62651c3c chore: update .gitignore to include additional Gitea workflow files
- Added .gitea/workflows/deploy.yml and .gitea/workflows/build.yml to .gitignore to prevent tracking of these workflow configuration files.
2025-11-21 15:13:15 +03:00
a52b2d13f0 Add Gitea workflows for CI/CD pipeline 2025-11-21 15:03:31 +03:00
ianshaloom
528ae0072e fix: correct heading in Gitea workflow documentation
- Updated the heading from "Related Documentation" to "Related Documentations" for consistency in the .gitea/workflows/README.md file.
2025-11-21 14:56:04 +03:00
ianshaloom
27f6629308 chore: remove unnecessary blank line in Gitea workflow configuration
- Cleaned up the .gitea/workflows/test.yml file by removing an extra blank line for better readability.
2025-11-21 14:37:12 +03:00
ianshaloom
9a5508ffe8 chore: update .gitignore to include Gitea workflow files
- Added .gitea/workflows/deploy.yml and .gitea/workflows/build.yml to .gitignore to prevent tracking of workflow configuration files.
2025-11-21 14:23:50 +03:00
ianshaloom
d5b78d7449 feat: implement clean public URLs and slug-based image storage
- 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
2025-11-21 10:47:01 +03:00