Resumable Upload API

This article demonstrates how to use the response object from the Generate File Resumable Upload Url endpoint to upload a file to a site's Media Manager.

Note: Due to limits on the size and duration of files that you can upload, we recommend using the importFile() function. See Wix Media: Supported Media File Types and File Sizes for more details.

Authorization

This endpoint uses the uploadToken from the response for authorization. No additional authorization is needed.

Syntax

Copy

Query Params

NameTypeOptionalDescription
filenamestringnoFile name that appears in the Media Manager. Include the file's extension in the name to prevent potential errors.

Example

Implement a Resumable Upload Client using TUS Protocol

In this example we use tus-js-client to implement a resumable upload using the TUS protocol.

Request

Copy

Note: Receiving a successful response does not indicate that the upload is complete. To run code when the upload finishes, use the onFileDescriptorFileReady() and onFileDescriptorFileFailed() events. Learn more about knowing when a file is ready.

Response

Copy

Status/Error Codes

Errors from this endpoint will include an HTTP status code.

Did this help?