Multipart file uploads increase network throughput by uploading multiple parts of your file in parallel.
The benefits of multipart file uploads are:
Higher file upload rate (1000 req/sec by default)
Larger files (up to 5TB for enterprise customers)
Parallel upload requests for a single file
Only failed parts of the file need to be re-uploaded on network failure (not the entire file)
The Bytescale API supports multipart file uploads, in addition to single part uploads:
BasicUpload single part upload
FormDataUpload single part upload
UploadFromUrl single part upload
BeginMultipartUpload multipart upload
The Upload Widget and Bytescale SDKs have multipart file uploads built in.
To implement multipart file uploads manually, for example, to use a programming language that Bytescale doesn't provide an SDK for:
Calculate the file's size.
Call begin multipart upload, passing the file's name, size, and type.
Open the file for reading.
Read the correct section of the file. (This is the section specified by the inclusiveStart andinclusiveEnd fields from the HTTP response from step 2 or step 10.)
Make an HTTP PUT request, using the data from step 4 as the request body, and the uploadUrl from the HTTP response from step 2 (or step 10) as the URL.
Request must include the Content-Length header.
Request must not include the Transfer-Encoding: Chunked header.
Read the etag HTTP response header from step 5.
Call complete upload part, passing the etag, uploadId, and uploadPartIndex.
If uploadPartIndex = uploadParts.count - 1, then exit (the upload is complete), else continue:
Call get upload part, passing an incremented uploadPartIndex.
Repeat from step 4, using the new uploadPartIndex, uploadUrl, inclusiveStart, and inclusiveEnd returned by step 10.
This website uses cookies. By continuing you are consenting to the use of cookies per our Cookie Policy. Our legal policies were last updated August 16 2024.
This website requires a modern web browser -- the latest versions of these browsers are supported: