다큐멘트 센터 Object Storage API InitiateMultipartUpload

InitiateMultipartUpload

최신 업데이트:2022-03-01 18:22:17

When using multipart upload, you must first call the Initiate Multipart Upload interface to create a task, and the system will return a globally unique multipart upload task number uploadId to the user as the task identifier. Subsequent users can initiate related requests based on this identifier, such as uploading segments, merging segments, and enumerating segments. The same object can have multiple multi-part upload tasks at the same time; each multi-part upload task can be initialized with additional message header information.

IAM wos:PutObject permission is required.

Request syntax

POST /ObjectName?uploads HTTP/1.1
Host: Bucket.Endpoint
Date: date
Authorization: authorization

Cache-Control: CacheControl
Content-Disposition: ContentDisposition
Content-Encoding: ContentEncoding
Content-Language: ContentLanguage
Content-Length: ContentLength
Content-MD5: ContentMD5
Content-Type: ContentType
Expires: Expires

URI request parameters

no

Request header

In addition to using the public request header , it also supports

parameter

description

Is it required

Content-MD5

The MD5 of the original data, if the data is not damaged during transmission and the MD5 is inconsistent, it will respond with 403 SignatureDoesNotMatch


x-wos-storage-class

Determine the storage type of the file, Standard-standard storage, IA-low frequency storage, Archive-archive storage. Default storage type in the same space

no

x-wos-meta-*

Customer-defined metadata will be returned as it is in headObject and getObject

no

Request body

no

Response syntax

HTTP/1.1 status_code

x-wos-request-id: request id
Date: date
Content-Length: length
Connection: status

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <InitiateMultipartUploadResult xmlns="https://www.wangsu.com/document">
    <Bucket>BucketName</Bucket>
    <Key>ObjectName</Key>
    <UploadId>uploadID</UploadId>
</InitiateMultipartUploadResult>

Response header

Only use public response headers .

Response element

Element name

description

InitiateMultipartUploadResult

The container
type describing the multipart upload task : XML
child node: Bucket , Key , UploadId
parent node: empty

Bucket

The space name
type of the space where the multipart upload object is located : string
Parent node: InitiateMultipartUploadResult

Key

The key
type of the multipart upload object : string
Parent node: InitiateMultipartUploadResult

UploadId

Multipart upload id , use this id to specify the multipart upload task
type: string
parent node: InitiateMultipartUploadResult when performing multipart upload later

Special error

Situation

Http Status

Error Code

Message

Signatures with uploads , URL in did not bring uploads ; or URL there with uploads , the signature did not bring uploads

403 Foribidden

SignatureDoesNotMatch

The request signature we calculated does not match the signature

Signatures with uploads , URL of uploads illegal (such as spelling errors); or URL there with uploads , signature uploads illegal (such as spelling errors)

403 Foribidden

SignatureDoesNotMatch

The request signature we calculated does not match the signature you provided.

Both the signature and URL have uploads , but the spelling errors are inconsistent

403 Foribidden

SignatureDoesNotMatch

The request signature we calculated does not match the signature you provided.

Example

POST /objectkey?uploads HTTP/1.1

Host: bucket.s3-cn-east-1.wcsapi.com
Date: Mon, 1 Apr 2017 20:34:56 GMT
Authorization: WOS AKIAIOSFODNN7EXAMPLE:VGhpcyBtZXNzYWdlIHNpZ25lZGGieSRlbHZpbmc=


HTTP/1.1 200 OK

x-wos-request-id: 996c76696e6727732072657175657374
Date: Mon, 1 Apr 2017 20:34:56 GMT
Content-Length: 146
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <InitiateMultipartUploadResult xmlns="https://www.wangsu.com/document">
    <Bucket>bucket01</Bucket>
    <Key>objectkey</Key>
    <UploadId>DCD2FC98B4F70000013DF578ACA318E7</UploadId>
</InitiateMultipartUploadResult>

이 문서의 내용이 도움이 되었습니까?
아니오
정상적으로 제출되었습니다.피드백을 주셔서 감사합니다.앞으로도 개선을 위해 노력하겠습니다.