S3 Create Multipart Upload
    • Dark
      Light

    S3 Create Multipart Upload

    • Dark
      Light

    Article summary

    POSThttps://s3.<your-region>.backblazeb2.com/<your-bucket-name>/<your-key>?uploads

    This action initiates a multipart upload and returns an uploadId. This uploadId is used to associate all of the parts in the specific multipart upload.

    AUTHORIZATION AWS Signature

    This request is using AWS Signature from collection Backblaze B2 Cloud Storage S3 Compatible API.

    Live Read

    Backblaze B2 Live Read provides the ability to read data from a multipart object while that object is uploading.

    To learn more about Live Read, click here.

    Enabling Live Read

    To enable the Live Read feature and allow data retrieval from a current multipart upload, use the x-backblaze-live-read-enabled HTTP header with a value set to true.

    Part Size

    You can also specify the part size when enabling Live Read by using the x-backblaze-live-read-part-size HTTP header. The part size (in bytes) has a minimum allowable size of 5 MB (5,000,000 bytes) and a maximum allowable size of 5 GiB (5,368,709,120 bytes).

    The specified part size is used for all of the parts except the last part.

    Note
    When you make a Live Read-enabled S3 Get Object or S3 Head Object request with a byte range, the specified part size is used to determine which part numbers correspond to the requested byte range.

    See "Live Read Error Codes" below for a complete list of Live Read-related errors.

    HEADERS

    x-backblaze-live-read-enabledYou must include this HTTP header with a value of TRUE(case-insensitive) to enable the Live Read feature.

    Any value other than TRUE is treated as false.

    x-backblaze-live-read-part-sizeUse this optional header to specify the part size (in bytes) to be used to determine which part numbers correspond to the requested byte range.

    The accepted part size byte range is 5 MB (5,000,000 bytes) to 5 GiB (5,368,709,120) bytes.

    PARAMS

    upload

    Must be present for a multipart upload.

    PATH VARIABLES

    bucket

    Required. The name of the bucket

    key

    Required. Key of the object to be written.

    Example Request

    curl --location --request POST 'https://s3.<your-region>.backblazeb2.com/my-bucket-name/object-1?uploads=null'

    Example Response

    200 OK

    Body

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <InitiateMultipartUploadResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
        <Bucket>my-bucket-name</Bucket>
        <Key>object-1</Key>
        <UploadId>4_z6145af89f355ac2f74ed0c1b_f2025e1f1817e0030_d20220128_m233615_c004_v0402000_t0048</UploadId>
    </InitiateMultipartUploadResult>

    Headers

    Cache-Control

    max-age=0, no-cache, no-store

    Content-Type

    application/xml

    Content-Length

    348

    x-amz-request-id

    90e17e227a223955

    x-amz-version-id

    4_z6145af89f355ac2f74ed0c1b_f2025e1f1817e0030_d20220128_m233615_c004_v0402000_t0048

    x-amz-id-2

    aMa41BGZMOZMztjUfY9JmpzRnZLRjZmIQ

    Date

    Fri, 28 Jan 2022 23:14:48 GMT

    Keep-Alive

    timeout=5

    Connection

    keep-alive

    Live Read Error Codes

    Error codeMessageHTTP status code
    InvalidArgument
    Invalid Live Read part size provided in header x-backblaze-live-read-part-size.400 Bad Request
    InvalidArgumentLive Read part size in header x-backblaze-live-read-part-size is smaller than the minimum allowed size of 5000000 bytes.400 Bad Request
    InvalidArgument
    Live Read part size in header x-backblaze-live-read-part-size is larger than the maximum allowed size of 5368709120 bytes.400 Bad Request

    Was this article helpful?

    What's Next