---
title: "media.upload@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/media.upload"
updated: null
---

# media.upload@1 · OpenVibe.Services

HTML: [media.upload@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/media.upload)

# MediaUpload `media.upload@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: media
- Visibility: public
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/media/upload.v1.json`](/docs/contracts/media.upload.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 |  | - `pattern ^mup_[0-9A-HJKMNP-TV-Z]{26}$` |
| `object_id` | string | yes |  | - `pattern ^med_[0-9A-HJKMNP-TV-Z]{26}$` |
| `status` | enum | yes |  | - `one of "active", "completing", "completed", "aborted", "expired"` |
| `part_size` | integer | yes |  | - `minimum 5242880` |
| `total_size` | integer | yes |  | - `minimum 1` |
| `parts_expected` | integer | yes |  | - `minimum 1`<br>- `maximum 10000` |
| `expires_at` | string | yes |  | - `format date-time` |
| `created_at` | string | yes |  |  |
| `parts` | [media.upload-part](/docs/contracts/media.upload-part) |  |  |  |
| `received_bytes` | integer |  |  | - `minimum 0` |
| `missing` | array of integer |  |  | - `items: minimum 1` |
| `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 }] }
~~~~
