DocsAPI referenceFiles
Send one part of a multipart upload
Use multipart.part_url_template with the part number, 1 to part_count. Send exactly part_size_bytes (the last part: the rest of the file). A part that fails can be sent again; a received one cannot. An optional Content-Digest: sha-256=:<base64>: is checked. At most 10 parts of an upload at once. No API key is required.
PUT /v1/uploads/{id}/parts/{part_number}
Needs no API key.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | |
part_number required | path | string | |
account required | query | string | |
expires required | query | string | |
signature required | query | string | |
content-digest | header | string |
Request
bash
# From the answer of POST /v1/uploads with multipart: true. It needs no API key.
curl --fail-with-body -X PUT "https://api.videxo.io/v1/uploads/up_0123456789abcdef01234567/parts/1?account=acc_7Gq2x9LmTnV4&expires=1793822400&signature=example" \
--data-binary @part.aaaaaCopy failed. The text is selected; copy it with your keyboard.
JavaScript
// `upload` is the answer of POST /v1/uploads with multipart: true. Its URLs need no API key.
import { readFile } from 'node:fs/promises';
const url = upload.multipart.part_url_template.replace('{part_number}', '1');
const response = await fetch(url, { method: 'PUT', body: await readFile('part.aaaaa') });
const part = await response.json();Copy failed. The text is selected; copy it with your keyboard.
Response
200 JSON
{
"part_number": 1,
"size_bytes": 8388608,
"sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08"
}Copy failed. The text is selected; copy it with your keyboard.
Responses
| Status | Body | When |
|---|---|---|
| 200 | UploadPart | The part was received. |
| 400 | Problem | invalid_request (size_mismatch, checksum_mismatch, invalid_fields): a wrong size, digest or part number |
| 401 | Problem | authentication_failed (client_token_revoked): the client token that created the upload was revoked |
| 403 | Problem | permission_denied (link_invalid, account_disabled) |
| 404 | Problem | not_found (upload): unknown, deleted or aborted |
| 409 | Problem | conflict (part_received, part_in_flight, upload_used): the part arrived, is being sent, or the upload is completed |
| 410 | Problem | resource_expired (upload_expired, link_expired) |
| 429 | Problem | rate_limited (parts_in_flight), with Retry-After in seconds |
| 503 | Problem | service_unavailable (temporary): send the part again |