This adds typed asset APIs to the geo client, covers the 3D/image upload-share flow in integration tests, and introduces a simple Leaflet web demo that places objects on map features and manages sharing visibility via backend links. Made-with: Cursor
This commit is contained in:
@@ -38,12 +38,42 @@ Each `properties.assets` item includes:
|
||||
5. Change visibility:
|
||||
- `PATCH /v1/assets/{id}` with `{"isPublic": false|true}`
|
||||
|
||||
## Example asset payload inside a feature
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "feature-id",
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"name": "Palm Tree Spot",
|
||||
"assets": [
|
||||
{
|
||||
"id": "asset-id",
|
||||
"kind": "3d",
|
||||
"name": "Palm Tree",
|
||||
"description": "Low-poly tree",
|
||||
"checksum": "abc123...",
|
||||
"ext": "glb",
|
||||
"isPublic": true,
|
||||
"link": "/v1/assets/asset-id/download"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Visibility rules
|
||||
|
||||
- Owner can always download their own asset.
|
||||
- Other authenticated users can download only when `isPublic=true`.
|
||||
- Owner can toggle `isPublic` at any time.
|
||||
|
||||
## Deduplication behavior
|
||||
|
||||
- Deduplication is per owner and file identity (`owner_key + checksum + ext`).
|
||||
- If the same user submits the same checksum/extension again, backend reuses existing asset metadata.
|
||||
- One asset can be linked to multiple features without duplicating object storage files.
|
||||
|
||||
## Spatial readiness for 3D search
|
||||
|
||||
Feature storage is prepared for future spatial search:
|
||||
|
||||
Reference in New Issue
Block a user