This article demonstrates how to use the response object from Generate File Resumable Upload Url 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 Import File. See Wix Media: Supported Media File Types and File Sizes for more details.
This method uses the uploadToken
from the response for authorization.
No additional authorization is needed.
Name | Type | Optional | Description |
---|---|---|---|
filename | string | no | File name that appears in the Media Manager. Include the file's extension in the name to prevent potential errors. |
In this example we use tus-js-client to implement a resumable upload using the TUS protocol.
Note: Receiving a successful response does not indicate that the upload is complete. To run code when the upload finishes, listen for the File Ready and File Failed events. Learn more about knowing when a file is ready.