Skip to content

Upload the next media part using its exact Content-Length

PubNio API media.uploadPart: upload the next media part using its exact Content-Length. Request fields, examples in five clients, errors, and idempotency.

Upload the next media part using its exact Content-Length with PUT /api/v1/media/uploads/{mediaId}/parts/{partNumber}. Requires an API key with the read scope or a signed-in workspace member.

Request

Parameter In Type Required
mediaId path UUID Yes
partNumber path string Yes
content-length header string Yes
workspaceId query UUID Yes

Response

  • HTTP 200: MediaPartReceipt with partNumber.

The OpenAPI document has each field’s type.

Examples

const asset = await workspace.media.upload(file);

The SDK’s media.upload() runs this step itself for a file too large for one request.

part = workspace.media.upload_part(
    media_id,
    1,
    content=open("part-1.bin", "rb").read(),
)
curl -X PUT "https://pubnio.com/api/v1/media/uploads/$MEDIA_ID/parts/1?workspaceId=$WORKSPACE_ID" \
  -H "Authorization: Bearer $PUBNIO_API_KEY" \
  -H "Content-Type: application/octet-stream" \
  --data-binary @part-1.bin
pnio media upload ./launch.mp4

Hosted MCP’s execute tool cannot carry this operation’s binary body or response.

Errors

It also declares the problems most operations declare.

Idempotency

No key, so a retried PUT is not deduplicated. Read the current state before you retry.

Limits

  • It is one step of a resumable upload. Agents usually call media.upload, media.import, or media.uploadInline instead.

Type to search…

↑↓ navigate↵ selectEsc close