MediaUpload media.upload@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- media
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/media/upload.v1.json
media.upload@1: a resumable multipart session. Store upload_id and object_id to resume after a reload; GET status lists received and missing parts. URLs contain a short-lived upload token and should not be logged.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
upload_id | string | yes |
| |
object_id | string | yes |
| |
status | enum | yes |
| |
part_size | integer | yes |
| |
total_size | integer | yes |
| |
parts_expected | integer | yes |
| |
expires_at | string | yes |
| |
created_at | string | yes | ||
parts | media.upload-part | |||
received_bytes | integer |
| ||
missing | array of integer |
| ||
token | string | |||
part_url_template | string | |||
status_url | string | |||
complete_url | string | |||
abort_url | string |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: basic
{
"upload_id": "mup_01K5WZX7S7Q4D2B8N3M6V1C9TZ",
"object_id": "med_01K5WZX7S7Q4D2B8N3M6V1C9TZ",
"status": "active",
"part_size": 8388608,
"total_size": 8388608,
"parts_expected": 1,
"expires_at": "2026-11-10T00:00:00Z",
"created_at": "2026-11-09 00:00:00",
"parts": [],
"received_bytes": 0,
"missing": [
1
]
}Rejected: basic
{
"upload_id": "wrong"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('media.upload@1', value); // { valid, errors: [{ path, message }] }