fix(v3-actions): implement from_hosted_file and harden vision IDs
1. Implemented specialized 'from_hosted_file' action for Event Files.\n2. Fixed ValueError in Pydantic models by removing default/default_factory conflict.\n3. Hardened integer stripping to strictly enforce Vision Standards.\n4. Updated documentation for the new action route.
This commit is contained in:
@@ -151,6 +151,23 @@ While `hosted_file` handles generic storage, `event_file` actions are context-aw
|
||||
**Path**: `GET /v3/action/event_file/{id}/download`
|
||||
*Semantic alias for the universal hosted_file downloader.*
|
||||
|
||||
### C. Link Existing Hosted File
|
||||
**Path**: `POST /v3/action/event_file/from_hosted_file/{hosted_file_id}`
|
||||
|
||||
Use this when a file is already in standard storage (e.g., from a previous session or general archive) and you want to link it to an Event object without re-uploading.
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `hosted_file_id` | Path | Yes | String ID of the physical file. |
|
||||
| `for_type` | Body | Yes | Target object type (e.g., `event_session`). |
|
||||
| `for_id` | Body | Yes | String ID of the target object. |
|
||||
| `event_id` | Body | No | Optional event context. |
|
||||
|
||||
**Features:**
|
||||
- **Vision IDs:** Accepts string IDs in both the path and JSON body.
|
||||
- **Relational Integrity:** Automatically creates both `hosted_file_link` and `event_file` records.
|
||||
- **Enriched Return:** Returns the full `event_file` object.
|
||||
|
||||
---
|
||||
|
||||
## 6. Hosted File Management (Legacy)
|
||||
|
||||
Reference in New Issue
Block a user