Add photo content-hash dedup and local↔S3 library sync.
Uploads skip per-gallery duplicates, checksums can be backfilled, and STORAGE_BACKEND plus sync tooling make switching storage backends safe.
This commit is contained in:
+12
-3
@@ -29,10 +29,19 @@ JWT_SECRET=
|
||||
# Public site origin, used to build share links and allow dev CORS
|
||||
FRONTEND_URL=https://spanglishcommunity.com
|
||||
|
||||
# Photo storage. Local disk by default; setting BOTH S3_ENDPOINT and
|
||||
# S3_BUCKET switches to S3 (same convention as the backend's media storage).
|
||||
# Use a photos-specific bucket — do not reuse the backend's media bucket.
|
||||
# Photo storage. Which backend serves requests:
|
||||
# auto (default) S3 when S3_ENDPOINT + S3_BUCKET are set, local otherwise
|
||||
# — the backend's convention (backend/src/lib/storage.ts)
|
||||
# local always local disk, even with the S3 settings filled in
|
||||
# s3 always S3
|
||||
# Keep both sides filled in and flip this one line to switch backends. Both
|
||||
# are also required by the library sync (`npm run sync:photos:to-s3` /
|
||||
# `:to-local`), which copies every photo from one backend to the other.
|
||||
STORAGE_BACKEND=auto
|
||||
|
||||
STORAGE_PATH=./data/photos
|
||||
|
||||
# Use a photos-specific bucket — do not reuse the backend's media bucket.
|
||||
#S3_ENDPOINT=
|
||||
#S3_REGION=auto
|
||||
#S3_BUCKET=spanglish-photos
|
||||
|
||||
Reference in New Issue
Block a user