최신 업데이트: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.
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
no
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 |
no
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>
Only use public response headers .
Element name | description |
InitiateMultipartUploadResult | The container |
Bucket | The space name |
Key | The key |
UploadId | Multipart upload id , use this id to specify the multipart upload task |
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. |
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>