forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
311 lines
30 KiB
HTML
311 lines
30 KiB
HTML
<a name="obs_04_0102"></a><a name="obs_04_0102"></a>
|
|
|
|
<h1 class="topictitle1">Completing a Multipart Upload</h1>
|
|
<div id="body33184662"><div class="section" id="obs_04_0102__section5584184924715"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0102__p34328485">After uploading all parts for a multipart upload, you can use this operation to complete the multipart upload. Before performing this operation, you cannot download the uploaded data. When merging parts, you need to copy the additional message header information recorded during the initialization of the multipart upload task to the object metadata. The processing process is the same as that of the common upload object with these message headers. In the case of merging parts concurrently, the Last Write Win policy must be followed but the time for initiating Last Write is specified as the time when a part multipart upload is initiated.</p>
|
|
<p id="obs_04_0102__p40520913">If a multipart upload has not been aborted, the uploaded parts occupy your storage quota. After all parts in the multipart upload are merged to an object, only the object occupies your storage quota. If a part uploaded in a multipart upload is not used in any merging parts multipart uploads, the part will be deleted to release storage quota.</p>
|
|
<p id="obs_04_0102__p29143897">You can send a request for downloading all or some data of the generated multipart by specifying a range.</p>
|
|
<p id="obs_04_0102__p60968488">You can send a request for deleting all parts uploaded in a multipart upload. Deleted data cannot be restored.</p>
|
|
<p id="obs_04_0102__p11845486">The merged parts do not use the MD5 value of entire object as the ETag. Their ETag is calculated as follows: <em id="obs_04_0102__i30226508">MD5</em><em id="obs_04_0102__i3603119">(M<sub id="obs_04_0102__sub32428072">1</sub>M<sub id="obs_04_0102__sub23417192">2</sub></em><em id="obs_04_0102__i9428136">...M<sub id="obs_04_0102__sub17744361">N</sub></em><em id="obs_04_0102__i25481524">)-N</em>, where <em id="obs_04_0102__i50737589">M<sub id="obs_04_0102__sub53985125">n</sub></em> is the MD5 value of part <em id="obs_04_0102__i8423526979055">n</em> (<em id="obs_04_0102__i20197182045511">N</em> is the total number of parts). As described in the <a href="#obs_04_0102__section74706439232">Sample Request</a>, there are three parts and each part has an MD5 value. The MD5 values of the three parts are recalculated to obtain a new MD5 value. Then <em id="obs_04_0102__i842352697937">-N</em> is added to the right of the MD5 value to get the ETag of the combined parts. In this example, <em id="obs_04_0102__i135621710195820">-N</em> is <strong id="obs_04_0102__b2695142115818">-3</strong>.</p>
|
|
<p id="obs_04_0102__p1390416971617">If the response to an object merge request times out and error 500 or 503 is returned, you can first obtain the object metadata of the multipart upload task. Then, check whether the value of header <strong id="obs_04_0102__b121626361018">x-obs-uploadId</strong> in the response is the same as the ID of this multipart upload task. If they are the same, object parts have been successfully merged on the server and you do not need to try again. For details, see <a href="obs_04_0118.html">Consistency of Concurrent Operations</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section867910481251"><h4 class="sectiontitle">WORM</h4><p id="obs_04_0102__p1566012417013">If a bucket has WORM enabled, the WORM protection will be automatically applied to the object generated after a multipart upload is complete. If you specify WORM headers and a retention expiration date when you initiate a multipart upload, the protection for the assembled object ends on the specified date. If you do not specify WORM headers during the initiation, but have configured the default bucket-level retention policy, this default policy is automatically applied and the protection starts when the multipart upload is complete. After a multipart upload is complete, you can still configure object-level WORM retention policies for the assembled object.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section39500516"><h4 class="sectiontitle">Versioning</h4><p id="obs_04_0102__p10719024">If a bucket has versioning enabled, a unique version ID is generated for an object created from a multipart upload in this bucket and the version ID is returned in response header <strong id="obs_04_0102__b206596151593756">x-obs-version-id</strong>. If versioning is suspended for a bucket, the object version obtained after the merge is <strong id="obs_04_0102__b849431175817">null</strong>. For details about the versioning statuses of a bucket, see <a href="obs_04_0037.html">Configuring Versioning for a Bucket</a>.</p>
|
|
<div class="notice" id="obs_04_0102__note64540071"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p class="cautiontext" id="obs_04_0102__p43989735">If 10 parts are uploaded but only nine parts are selected for merge, the parts that are not merged will be automatically deleted by the system. The parts that are not merged cannot be restored after being deleted. Before combining the parts, adopt the interface used to list the parts that have been uploaded to check all parts to ensure that no part is missed.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section19960332"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0102__screen16607122"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span>
|
|
<span class="normal">14</span>
|
|
<span class="normal">15</span>
|
|
<span class="normal">16</span>
|
|
<span class="normal">17</span>
|
|
<span class="normal">18</span>
|
|
<span class="normal">19</span></pre></div></td><td class="code"><div><pre><span></span>POST<span class="w"> </span>/ObjectName?uploadId=uploadID<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Date:<span class="w"> </span>date
|
|
Content-Length:<span class="w"> </span>length
|
|
Authorization:<span class="w"> </span>authorization
|
|
<span class="nt"><CompleteMultipartUpload></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><PartNumber></span>partNum<span class="nt"></PartNumber></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>etag<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><PartNumber></span>partNum<span class="nt"></PartNumber></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>etag<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><PartNumber></span>partNum<span class="nt"></PartNumber></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>etag<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Part></span><span class="w"> </span>
|
|
<span class="nt"></CompleteMultipartUpload></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section45425261"><h4 class="sectiontitle">Request Parameters</h4><p id="obs_04_0102__p2999678">This request uses parameters to specify the ID of a multipart upload whose parts will be merged. <a href="#obs_04_0102__table6473820">Table 1</a> describes the parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0102__table6473820"></a><a name="table6473820"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0102__table6473820" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0102__row7434325"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.3.2.4.1.1"><p id="obs_04_0102__p65309452">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.3.2.4.1.2"><p id="obs_04_0102__p30406218">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.5.3.2.4.1.3"><p id="obs_04_0102__p20207940">Mandatory</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0102__row34747125"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.1 "><p id="obs_04_0102__p63053713">uploadId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.2 "><p id="obs_04_0102__p7077154">Indicates a multipart upload.</p>
|
|
<p id="obs_04_0102__p63694394">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.5.3.2.4.1.3 "><p id="obs_04_0102__p58972309">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section6174170"><h4 class="sectiontitle">Request Headers</h4><p id="obs_04_0102__p12027737">This request uses common headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section55567530"><h4 class="sectiontitle">Request Elements</h4><p id="obs_04_0102__p44067988">This request uses elements to specify the list of parts to be merged. <a href="#obs_04_0102__table57330131">Table 2</a> describes the elements.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0102__table57330131"></a><a name="table57330131"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0102__table57330131" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request Elements</caption><thead align="left"><tr id="obs_04_0102__row5002303"><th align="left" class="cellrowborder" valign="top" width="24.240000000000002%" id="mcps1.3.7.3.2.4.1.1"><p id="obs_04_0102__p2533438">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="56.57%" id="mcps1.3.7.3.2.4.1.2"><p id="obs_04_0102__p34937624">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.189999999999998%" id="mcps1.3.7.3.2.4.1.3"><p id="obs_04_0102__p35268942">Mandatory</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0102__row8364251"><td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0102__p6415744">CompleteMultipartUpload</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0102__p49913241">List of parts to be combined</p>
|
|
<p id="obs_04_0102__p46565989">Type: XML</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0102__p13748744">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row56629833"><td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0102__p23613743">PartNumber</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0102__p33665067">Part number</p>
|
|
<p id="obs_04_0102__p34550147">Type: integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0102__p47098552">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row21233790"><td class="cellrowborder" valign="top" width="24.240000000000002%" headers="mcps1.3.7.3.2.4.1.1 "><p id="obs_04_0102__p42215463">ETag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="56.57%" headers="mcps1.3.7.3.2.4.1.2 "><p id="obs_04_0102__p64009348">ETag value returned upon successful upload of a part. It is the unique identifier of the part content. This parameter is used to verify data consistency when parts are merged.</p>
|
|
<p id="obs_04_0102__p39213226">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.189999999999998%" headers="mcps1.3.7.3.2.4.1.3 "><p id="obs_04_0102__p22154737">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section30345728"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0102__screen56362893"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span>
|
|
<span class="normal">9</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
Date:<span class="w"> </span>date
|
|
<span class="cp"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span><span class="w"> </span>
|
|
<span class="nt"><CompleteMultipartUploadResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.region.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><Location></span>http://example-Bucket.obs.region.example.com/example-Object<span class="nt"></Location></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Bucket></span>bucketname<span class="nt"></Bucket></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Key></span>ObjectName<span class="nt"></Key></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>ETag<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="nt"></CompleteMultipartUploadResult></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section4676100"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0102__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
|
|
<p id="obs_04_0102__p27104446">In addition to the common response headers, the following message headers may also be used. For details, see <a href="#obs_04_0102__table31698209142128">Table 3</a>.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0102__table31698209142128"></a><a name="table31698209142128"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0102__table31698209142128" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Additional response headers</caption><thead align="left"><tr id="obs_04_0102__row6742918"><th align="left" class="cellrowborder" valign="top" width="40.400000000000006%" id="mcps1.3.9.4.2.3.1.1"><p id="obs_04_0102__p9305492">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.599999999999994%" id="mcps1.3.9.4.2.3.1.2"><p id="obs_04_0102__p15547427">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0102__row51382107"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0102__p1201123">x-obs-version-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0102__p30182115">Version of the object after parts being merged.</p>
|
|
<p id="obs_04_0102__p3203584">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row28832260"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0102__p53711725">x-obs-server-side-encryption</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0102__p55682503">This header is included in a response if SSE-KMS is used.</p>
|
|
<p id="obs_04_0102__p31380486">Type: string</p>
|
|
<p id="obs_04_0102__p13988922">Example: <strong id="obs_04_0102__b19561175694120">x-obs-server-side-encryption:kms</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row58791436"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0102__p64485846">x-obs-server-side-encryption-kms-key-id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0102__p55971020">Indicates the master key ID. This header is included in a response if SSE-KMS is used. </p>
|
|
<p id="obs_04_0102__p434923183716">Type: string</p>
|
|
<p id="obs_04_0102__p77125315113">Format: <em id="obs_04_0102__i148851348258">regionID</em><strong id="obs_04_0102__b17891248855">:</strong><em id="obs_04_0102__i189114481258">domainID</em><strong id="obs_04_0102__b689112489511">:key/</strong><em id="obs_04_0102__i11891648452">key_id</em></p>
|
|
<p id="obs_04_0102__p183417237379"><em id="obs_04_0102__i37721252155811">regionID</em> indicates the ID of the region where the key belongs. <em id="obs_04_0102__i077215255810">domainID</em> indicates the ID of the tenant where the key belongs. <em id="obs_04_0102__i2077215265820">key_id</em> indicates the key ID used in this encryption.</p>
|
|
<p id="obs_04_0102__p16411228309">Example: <strong id="obs_04_0102__b484714219">x-obs-server-side-encryption-kms-key-id:</strong><strong id="obs_04_0102__b138491841119"><em id="obs_04_0102__i1884994216">region</em></strong><strong id="obs_04_0102__b108501942015">:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row37358808"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.9.4.2.3.1.1 "><p id="obs_04_0102__p6164575">x-obs-server-side-encryption-customer-algorithm</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.9.4.2.3.1.2 "><p id="obs_04_0102__p29568587">Indicates an encryption algorithm. This header is included in a response if SSE-C is used. </p>
|
|
<p id="obs_04_0102__p64790699">Type: string</p>
|
|
<p id="obs_04_0102__p46245380">Example: <strong id="obs_04_0102__b956867104214">x-obs-server-side-encryption-customer-algorithm:AES256</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section42084903"><h4 class="sectiontitle">Response Elements</h4><p id="obs_04_0102__p54888305">This response uses elements to return the result of merging parts. <a href="#obs_04_0102__table32583578">Table 4</a> describes the elements.</p>
|
|
|
|
<div class="tablenoborder"><a name="obs_04_0102__table32583578"></a><a name="table32583578"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0102__table32583578" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response elements</caption><thead align="left"><tr id="obs_04_0102__row13675987"><th align="left" class="cellrowborder" valign="top" width="27.27%" id="mcps1.3.10.3.2.3.1.1"><p id="obs_04_0102__p34013151">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="72.72999999999999%" id="mcps1.3.10.3.2.3.1.2"><p id="obs_04_0102__p32416264">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0102__row9136636"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.10.3.2.3.1.1 "><p id="obs_04_0102__p1870090">Location</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="72.72999999999999%" headers="mcps1.3.10.3.2.3.1.2 "><p id="obs_04_0102__p17259612">Path of the object after parts have been merged.</p>
|
|
<p id="obs_04_0102__p21118787">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row55851355"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.10.3.2.3.1.1 "><p id="obs_04_0102__p27665902">Bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="72.72999999999999%" headers="mcps1.3.10.3.2.3.1.2 "><p id="obs_04_0102__p26345598">Bucket in which parts are merged.</p>
|
|
<p id="obs_04_0102__p35783792">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row53618674"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.10.3.2.3.1.1 "><p id="obs_04_0102__p48145331">Key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="72.72999999999999%" headers="mcps1.3.10.3.2.3.1.2 "><p id="obs_04_0102__p7457704">Indicates the key of the generated object.</p>
|
|
<p id="obs_04_0102__p10473">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0102__row94265"><td class="cellrowborder" valign="top" width="27.27%" headers="mcps1.3.10.3.2.3.1.1 "><p id="obs_04_0102__p7635536">ETag</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="72.72999999999999%" headers="mcps1.3.10.3.2.3.1.2 "><p id="obs_04_0102__p14498642">The result calculated based on the ETag of each part is the unique identifier of the object content.</p>
|
|
<p id="obs_04_0102__p63378920">Type: string</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section43219810"><h4 class="sectiontitle">Error Responses</h4><ol id="obs_04_0102__ol12159124681214"><li id="obs_04_0102__li64781349121210">If no message body exists, OBS returns <strong id="obs_04_0102__b3577110418">400 Bad Request</strong>.</li><li id="obs_04_0102__li14905185116126">If the message body format is incorrect, OBS returns <strong id="obs_04_0102__b96983221041">400 Bad Request</strong>.</li><li id="obs_04_0102__li1946035417123">If the part information in the message body is not sorted by part sequence number, OBS returns <strong id="obs_04_0102__b183551541416">400 Bad Request</strong> and the error code is <strong id="obs_04_0102__b53947417516">InvalidPartOrder</strong>.</li><li id="obs_04_0102__li991275619123">If the AK or signature is invalid, OBS returns <strong id="obs_04_0102__b1328598516">403 Forbidden</strong> and the error code is <strong id="obs_04_0102__b1632910911515">AccessDenied</strong>.</li><li id="obs_04_0102__li891125917129">If the requested bucket is not found, OBS returns <strong id="obs_04_0102__b255494618337">404 Not Found</strong> and the error code is <strong id="obs_04_0102__b255519466331">NoSuchBucket</strong>.</li><li id="obs_04_0102__li727210217139">If the requested multipart upload does not exist, OBS returns <strong id="obs_04_0102__b3359675895549">404 Not Found</strong> and error code <strong id="obs_04_0102__b6667687395549">NoSuchUpload</strong>.</li><li id="obs_04_0102__li131712541316">If the user is not the initiator of the task, OBS returns <strong id="obs_04_0102__b41554113612">403 Forbidden</strong> and the error code is <strong id="obs_04_0102__b167911575610">AccessDenied</strong>.</li><li id="obs_04_0102__li12003851319">If the request part list contains a part that does not exist, OBS returns <strong id="obs_04_0102__b6237434368">400 Bad Request</strong> and the error code is <strong id="obs_04_0102__b147949442063">InvalidPart</strong>.</li><li id="obs_04_0102__li20467911151312">If the Etag of the part contained in the request part list is incorrect, OBS returns <strong id="obs_04_0102__b188231730577">400 Bad Request</strong> and the error code is <strong id="obs_04_0102__b845612377715">InvalidPart</strong>.</li><li id="obs_04_0102__li473421551320">If the size of a part other than the last part is smaller than 100 KB, OBS returns <strong id="obs_04_0102__b19195113035018">400 Bad Request</strong>.</li><li id="obs_04_0102__li1415913468121">If the size of the object is greater than 48.8 TB after parts being merged, OBS returns status code <strong id="obs_04_0102__b7547194365012">400 Bad Request</strong>.</li></ol>
|
|
<p id="obs_04_0102__p44501859">Other errors are included in <a href="obs_04_0115.html#obs_04_0115__d0e843">Table 2</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section74706439232"><a name="obs_04_0102__section74706439232"></a><a name="section74706439232"></a><h4 class="sectiontitle">Sample Request</h4><div class="codecoloring" codetype="Xml" id="obs_04_0102__screen8996154692310"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span>
|
|
<span class="normal">14</span>
|
|
<span class="normal">15</span>
|
|
<span class="normal">16</span>
|
|
<span class="normal">17</span>
|
|
<span class="normal">18</span>
|
|
<span class="normal">19</span>
|
|
<span class="normal">20</span>
|
|
<span class="normal">21</span>
|
|
<span class="normal">22</span>
|
|
<span class="normal">23</span></pre></div></td><td class="code"><div><pre><span></span>POST<span class="w"> </span>/object02?uploadId=00000163D46218698DF407362295674C<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>05:23:46<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:dOfK9iILcKxo58tRp3fWeDoYzKA=
|
|
Content-Length:<span class="w"> </span>422
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="utf-8"?></span>
|
|
<span class="nt"><CompleteMultipartUpload></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><PartNumber></span>1<span class="nt"></PartNumber></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>a54357aff0632cce46d942af68356b38<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><PartNumber></span>2<span class="nt"></PartNumber></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>0c78aef83f66abc1fa1e8477f296d394<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><Part></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><PartNumber></span>3<span class="nt"></PartNumber></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>acbd18db4cc2f85cedef654fccc4a4d8<span class="nt"></ETag></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"></Part></span>
|
|
<span class="nt"></CompleteMultipartUpload></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0102__section8740182716598"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0102__screen127631527205918"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span>
|
|
<span class="normal">14</span>
|
|
<span class="normal">15</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>8DF400000163D4625BE3075019BD02B8
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABAAAQAAEAABAAAQAAEAABCSN8D1AfQcIvyGBZ9+Ee+jU6zv1iYdO4
|
|
Content-Type:<span class="w"> </span>application/xml
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>05:23:46<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>326
|
|
|
|
<span class="cp"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
|
|
<span class="nt"><CompleteMultipartUploadResult</span><span class="w"> </span><span class="na">xmlns=</span><span class="s">"http://obs.example.com/doc/2015-06-30/"</span><span class="nt">></span>
|
|
<span class="w"> </span><span class="nt"><Location></span>/examplebucket/object02<span class="nt"></Location></span>
|
|
<span class="w"> </span><span class="nt"><Bucket></span>examplebucket<span class="nt"></Bucket></span>
|
|
<span class="w"> </span><span class="nt"><Key></span>object02<span class="nt"></Key></span>
|
|
<span class="w"> </span><span class="nt"><ETag></span>"03f814825e5a691489b947a2e120b2d3-3"<span class="nt"></ETag></span>
|
|
<span class="nt"></CompleteMultipartUploadResult></span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0096.html">Operations on Multipart Upload</a></div>
|
|
</div>
|
|
</div>
|
|
|