Kaltura API DocumentationuploadToken.upload

Upload a file using the upload token id, returns an error on failure (an exception will be thrown when using one of the Kaltura clients)

Chunks can be uploaded in parallel and they will be appended according to their resumeAt position.

A parallel upload session should have three stages:

  1. A single upload with resume=false and finalChunk=false

  2. Parallel upload requests each with resume=true,finalChunk=false and the expected resumetAt position.

If a chunk fails to upload it can be re-uploaded.

  1. After all of the chunks have been uploaded a final chunk (can be of zero size) should be uploaded

with resume=true, finalChunk=true and the expected resumeAt position. In case an UPLOAD_TOKEN_CANNOT_MATCH_EXPECTED_SIZE exception

has been returned (indicating not all of the chunks were appended yet) the final request can be retried.

Try it out
post https://www.kaltura.com/api_v3/service/uploadtoken/action/upload

Request Parameters

fileData:file  required

Response

Success

object:KalturaUploadToken
autoFinalize:integer
Enum: NULL_VALUE [-1], FALSE_VALUE [0], TRUE_VALUE [1]

insertOnly

Enum Type: KalturaNullableBoolean

autoFinalize - Should the upload be finalized once the file size on disk matches the file size reproted when adding the upload token.

createdAt:integer

readOnly

Creation date as Unix timestamp (In seconds)

fileName:string

insertOnly

Name of the file for the upload token, can be empty when the upload token is created and will be updated internally after the file is uploaded

fileSize:number

insertOnly

File size in bytes, can be empty when the upload token is created and will be updated internally after the file is uploaded

id:string

readOnly

Upload token unique ID

minimumChunkSize:number

insertOnly

set the minimum size in bytes for each uploaded part of the file

partnerId:integer

readOnly

Partner ID of the upload token

status:integer
Enum: PENDING [0], PARTIAL_UPLOAD [1], FULL_UPLOAD [2], CLOSED [3], TIMED_OUT [4], DELETED [5]

readOnly

Enum Type: KalturaUploadTokenStatus

Status of the upload token

updatedAt:integer

readOnly

Last update date as Unix timestamp (In seconds)

uploadUrl:string

readOnly

Upload url - to explicitly determine to which domain to adress the uploadToken->upload call

uploadedFileSize:number

readOnly

Uploaded file size in bytes, can be used to identify how many bytes were uploaded before resuming

userId:string

readOnly

User id for the upload token