Upload Part - Copy
PUT /<ObjectName>?partNumber=PartNumber&uploadId=UploadId HTTP/1.1
Host: <Your-Bucket-Name>.ss.bscstorage.com
Date: <date>
x-amz-copy-source: </source-bucket/source-object>
Authorization: <authorization string> #Please refer to signature algorithm
HTTP/1.1 200 OK
Date: Tue, 08 Apr 2014 02:59:47 GMT
Connection: keep-alive
ETag: "<文件的MD5值>"
x-amz-request-id: 0000106c-1608-0810-4621-00163e000064
x-amz-s2-requester: <Your UserName>
<?xml version="1.0" encoding="UTF-8"?>
<CopyObjectResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<LastModified>Mon, 08 Aug 2016 05:04:10 GMT</LastModified>
<ETag>870c06c00566c4fb1861bb10f34d1904</ETag>
</CopyObjectResult>
Parameter |
Description |
Required |
partNumber |
The serial number of the document slice, starting from 1 |
Yes |
uploadId |
Uploadid value obtained through Initiate Multipart Upload (large file fragment upload initialization interface) |
Yes |
Name |
Description |
Required |
x-amz-copy-source |
The address of the file to be copied. format:/source-bucket/source-object,We need to encode urlencode as a whole
|
Yes |
Content-Length |
Must be 0
|
=0 |
x-amz-copy-source-if-match |
If the specified Etag matches the Etag of the source file, the source file can be copied, otherwise it returns412(PreconditionFailed)
|
No |
x-amz-copy-source-if-nonematch |
If the specified Etag does not match the Etag of the source file, the source file can be copied, otherwise it returns412(PreconditionFailed)
|
No |
x-amz-copy-source-if-unmodified-since |
If the source file has not been modified since the specified time, you can copy the source file; otherwise, return412(PreconditionFailed)
|
No |
x-amz-copy-source-if-modified-since |
If the source file is modified at the specified time, the source file can be copied, otherwise 412 is returned(PreconditionFailed)
|
No |
- Response Body(Response XML Body):
Name |
Description |
CopyObjectResult |
contain ETag and LastModified
|
ETag |
File's ETag
|
CopyObjectResult |
File last modified time
|
curl -v -X PUT -H "x-amz-copy-source: /bucket-123/path/to/file123.txt" -H "Date:
Sat, 20 Nov 2286 17:46:39 GMT" -H "Authorization: AWS <access_key>:<ssig>" "http://<Your-Bucket-Name>.ss.bscstorage.com/path/to/myfile.txt?partNumber=<PartNumber>&uploadId=<UploadId>"