-
Notifications
You must be signed in to change notification settings - Fork 1
Card Photos
You can attach front and back photos to any card in your collection. Photos are stored on the server, served through authenticated endpoints, and are never publicly accessible. Trade partners can view each other's card photos when reviewing a trade.
- Open your Collection.
- Click the pencil icon on any card to open the Edit Card modal.
- Click Photos inside the modal. This opens the PhotoUploadModal.
- Select the side you want to upload: Front or Back.
- Drag and drop an image file onto the upload area, or click to browse.
- A live preview appears before you confirm.
- Save the upload. The photo is stored immediately.
Each card entry supports one photo per side. Re-uploading a side replaces the existing photo for that side.
The CardPhotoViewer component is used wherever photos are displayed. It shows a Front/Back tab switcher and fetches each image via an authenticated reques. The image URL itself is not accessible without a valid session.
Photos can be viewed in two places:
- Edit Card modal - visible to the card owner when uploading or reviewing.
- TradeDetail - the Camera button next to each card in the counterpart's offer opens a viewer for that card. Both trade participants can view each other's photos.
Photos are stored on disk on the server host. The storage location is set by the UPLOADS_PATH environment variable.
| Variable | Default | Description |
|---|---|---|
UPLOADS_PATH |
./uploads |
Host directory where card photos are stored |
Map this path to a volume in your docker-compose.yml so photos persist across container restarts. See Configuration Reference and Installation for details.
| Method | Path | Description |
|---|---|---|
GET |
/collection/{entry_id}/photos/{side} |
Fetch a card photo by entry ID and side (front or back) |
POST |
/collection/{entry_id}/photos/{side} |
Upload or replace a photo for the given side |
GET |
/trades/{id}/photos/{entry_id}/{side} |
Serve a card photo to either participant in a trade |
All endpoints require authentication. The trade photo endpoint is accessible to both the card owner and the trade counterpart.