Upload large files
To upload large files, you must split the content into chunks no larger than 10 MB. To do this, use the chunk and chunks parameters to create a URL for each chunk you want to upload.
Chunk indexing starts at 0.
To upload large files:
-
To indicate the total number of chunks to be uploaded, add the chunks parameter to the upload URL.
-
To indicate which chunk is being uploaded in the current request, add the chunk parameter to the upload URL.
-
Repeat steps 2 and 3 until you have a URL for each chunk you want to upload.
-
When you have no more chunks to upload, make a final request by adding the chunks parameter to the upload URL to indicate the total number of chunks.
-
Upload or create a new asset, or update an existing one with a master or alternative file.
Example
The following example illustrates steps 2 to 5 when uploading a large file in three chunks.
The first request uploads chunk 0:
api/v2.0/upload/process?key=local-8e9a60a347b54293a377f6c818a8776c&name=tmp700.jpg&expires=2020-11-20T21:06:51.6292002+00:00&signature=pQDBjdFxseE&chunks=3&chunk=0
The second request uploads chunk 1:
api/v2.0/upload/process?key=local-8e9a60a347b54293a377f6c818a8776c&name=tmp700.jpg&expires=2020-11-20T21:06:51.6292002+00:00&signature=pQDBjdFxseE&chunks=3&chunk=1
The third request uploads chunk 2:
api/v2.0/upload/process?key=local-8e9a60a347b54293a377f6c818a8776c&name=tmp700.jpg&expires=2020-11-20T21:06:51.6292002+00:00&signature=pQDBjdFxseE&chunks=3&chunk=2
The final request notifies the system that there are no more chunks to upload:
api/v2.0/upload/process?key=local-59b7c645f5ce407f97405b7a5b00d15b&name=tmp700.jpg&expires=2020-11-20T21:06:51.6292002+00:00&signature=pQDBjdFxseE&chunks=3