openspec: photo-object-storage change — MinIO on .13, Go upload/serve, admin S3 disk
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
## ADDED Requirements
|
||||
|
||||
### Requirement: Photos stored in MinIO
|
||||
Photo uploads SHALL be stored as objects in the MinIO bucket, keyed by tag (`tags/{id}.{ext}`), with `tags.photo_url` set to the app's serve path (`/photos/tags/{id}.{ext}`).
|
||||
|
||||
#### Scenario: Upload a photo
|
||||
- **WHEN** the owner uploads an image on the edit page
|
||||
- **THEN** the object is stored in MinIO and the tag's `photo_url` points at `/photos/…`
|
||||
|
||||
### Requirement: Photos served by the app
|
||||
`GET /photos/{key...}` SHALL stream the object from MinIO with the correct content type and cache headers. External photo URLs SHALL continue to work.
|
||||
|
||||
#### Scenario: Public page shows the photo
|
||||
- **WHEN** a visitor opens an active tag page with an uploaded photo
|
||||
- **THEN** the image loads via `/photos/…`
|
||||
|
||||
#### Scenario: External URL photo
|
||||
- **WHEN** `photo_url` is an external https URL
|
||||
- **THEN** the page uses it directly (unchanged behaviour)
|
||||
|
||||
### Requirement: Photos survive redeploys
|
||||
Photo objects SHALL persist independently of the app (MinIO volume), so a fresh deploy does not lose photos.
|
||||
|
||||
#### Scenario: Redeploy after upload
|
||||
- **WHEN** the frontend is redeployed after a photo upload
|
||||
- **THEN** the photo still loads (object lives in MinIO)
|
||||
Reference in New Issue
Block a user