CreateMultipartUpload
Initiates a multipart upload and returns an upload ID.
Description
The CreateMultipartUpload
operation initiates a multipart upload and returns an upload ID. This upload ID is used to associate all of the parts in the specific multipart upload. You specify this upload ID in each of your subsequent UploadPart
operations.
note
- Use multipart upload for objects larger than 5 GB.
- After you initiate the multipart upload and upload one or more parts, you must either complete or abort the multipart upload.
- QStorage will not process any additional requests until the multipart upload is either completed or aborted.
- You can use SSE, but this means your uploaded data will be encrypted twice, once with the specified key, and again for storage.
Request Syntax
POST /ObjectKey?uploads HTTP/1.1
Host: BucketName.qstorage.quilibrium.com
Content-Type: Type
x-amz-tagging: TagSet
x-amz-expected-bucket-owner: OwnerAccountId
Values in italics indicate user input and should be replaced with actual values.
This operation does not have a request body.
Request Parameters
Headers
Name | Description | Required | Type |
---|---|---|---|
Content-Type | A standard MIME type describing the format of the object data | No | text |
x-amz-acl | The canned ACL to apply to the object Valid values: private | public-read | public-read-write | authenticated-read | aws-exec-read | bucket-owner-read | bucket-owner-full-control | No | text |
x-amz-tagging | The tag-set for the object. The tag-set must be encoded as URL Query parameters | No | text |
x-amz-server-side-encryption | Server-side encryption algorithm to use Valid values: AES256 | verenc | No | text |
x-amz-server-side-encryption-aws-kms-key-id | If x-amz-server-side-encryption is verenc, this specifies the ID of the QKMS key to use | No | text |
x-amz-server-side-encryption-context | If x-amz-server-side-encryption is verenc, this specifies the encryption context to use | No | text |
x-amz-server-side-encryption-bucket-key-enabled | Specifies whether to use an QStorage Bucket Key for object encryption with SSE-KMS Valid values: true | false | No | text |
x-amz-metadata-directive | Specifies whether the metadata is copied from the source object or replaced Valid values: COPY | REPLACE | No | text |
x-amz-website-redirect-location | If the bucket is configured as a website, redirects requests for this object to another object or URL | No | text |
x-amz-expected-bucket-owner | The account ID of the expected bucket owner | No | text |
Response Syntax
HTTP/1.1 200 OK
x-amz-id-2: RequestId
x-amz-request-id: AmazonRequestId
Date: ISO8601Date
<?xml version="1.0" encoding="UTF-8"?>
<InitiateMultipartUploadResult>
<Bucket>BucketName</Bucket>
<Key>ObjectKey</Key>
<UploadId>UploadId</UploadId>
</InitiateMultipartUploadResult>
Values in italics indicate variable response values.
Response Elements
Response Headers
Name | Description | Required | Type |
---|---|---|---|
x-amz-id-2 | An identifier for the request | No | String |
x-amz-request-id | A unique identifier for the request | No | String |
x-amz-server-side-encryption | The server-side encryption algorithm used when storing this object | No | String |
x-amz-server-side-encryption-aws-kms-key-id | If x-amz-server-side-encryption is verenc, this indicates the ID of the QKMS key used | No | String |
x-amz-server-side-encryption-context | If x-amz-server-side-encryption is verenc, this is the encryption context used | No | String |
x-amz-server-side-encryption-bucket-key-enabled | Indicates whether the multipart upload uses an S3 Bucket Key for SSE-KMS | No | String |
x-amz-abort-date | If the bucket has a lifecycle rule for incomplete multipart uploads, this header indicates when the upload becomes eligible for deletion | No | String |
x-amz-abort-rule-id | If the bucket has a lifecycle rule for incomplete multipart uploads, this header provides the ID of that rule | No | String |
Date | The date and time at which the response was sent | No | String |
Response Body Elements
Name | Description | Required | Type |
---|---|---|---|
Bucket | Name of the bucket to which the multipart upload was initiated | No | String |
Key | Object key for which the multipart upload was initiated | No | String |
UploadId | ID for the initiated multipart upload. This ID must be used in subsequent UploadPart and CompleteMultipartUpload operations | No | String |
Special Errors
Error Code | Description |
---|---|
NoSuchBucket | The specified bucket does not exist |
InvalidRequest | The request is not valid with the current state of the bucket |
403 | Forbidden. Authentication failed or you do not have permission to initiate multipart upload |
Permissions
You must have the s3:PutObject
permission.
Examples
Example 1: Initiate a multipart upload
POST /large-file.zip?uploads HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
Content-Type: application/zip
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
<?xml version="1.0" encoding="UTF-8"?>
<InitiateMultipartUploadResult>
<Bucket>my-bucket</Bucket>
<Key>large-file.zip</Key>
<UploadId>VXBsb2FkIElEIGZvciA2aWWpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA</UploadId>
</InitiateMultipartUploadResult>
Values in italics indicate variable response values.
Example 2: Initiate a multipart upload with tags
POST /large-document.pdf?uploads HTTP/1.1
Host: my-bucket.qstorage.quilibrium.com
Content-Type: application/pdf
x-amz-tagging: project=documentation&confidential=true
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
x-amz-id-2: Example7qoYGN7uMuFuYS6m7a4l
x-amz-request-id: TX234S0F24A06C7
Date: Wed, 01 Mar 2024 12:00:00 GMT
<?xml version="1.0" encoding="UTF-8"?>
<InitiateMultipartUploadResult>
<Bucket>my-bucket</Bucket>
<Key>large-document.pdf</Key>
<UploadId>VXBsb2FkIElEIGZvciA2aWWpbmcncyBteS1tb3ZpZS5tMnRzIHVwbG9hZA</UploadId>
</InitiateMultipartUploadResult>
Values in italics indicate variable response values.
Try It Out
Test CreateMultipartUpload
Initiate a multipart upload and get an upload ID.
Coming Soon
This feature is currently under development and will be available soon.