doc-exports/docs/obs/api-ref/obs_04_0081.html
zhangyue d5b1108742 OBS API DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-10-16 12:27:49 +00:00

1086 lines
75 KiB
HTML

<a name="obs_04_0081"></a><a name="obs_04_0081"></a>
<h1 class="topictitle1">Uploading Objects - POST</h1>
<div id="body14481882"><div class="section" id="obs_04_0081__section1534875573"><h4 class="sectiontitle">Functions</h4><p class="msonormal" id="obs_04_0081__p59601668">This operation uploads an object to a bucket. To use this operation, you must have the write permission on the bucket.</p>
<div class="note" id="obs_04_0081__note66652971"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="text" id="obs_04_0081__p63228075">The name of each object in a bucket must be unique.</p>
</div></div>
<p class="msonormal" id="obs_04_0081__p63005833">With versioning not enabled, if an object to be uploaded has the same name as an existing object in the bucket, the newly uploaded object will overwrite the existing one. To protect data from being corrupted during transmission, you can add the <strong id="obs_04_0081__b1130123461510">Content-MD5</strong> parameter in the form field. After receiving the uploaded object, OBS compares the provided MD5 value to the MD5 value it calculates. If the two values do not match, OBS reports an error. You can also specify the value of the <strong id="obs_04_0081__b1461685225154325">x-obs-acl</strong> parameter to configure an access control policy for the object.</p>
<p class="msonormal" id="obs_04_0081__p30181591">You can also upload an object using the POST method.</p>
<p id="obs_04_0081__p86711039908">For a single upload, the size of the object to be uploaded ranges [0, 5 GB]. To upload a file greater than 5 GB, see <a href="obs_04_0096.html">Operations on Multipart Upload</a>.</p>
<p class="msonormal" id="obs_04_0081__p3198871">This operation supports server-side encryption.</p>
</div>
<div class="section" id="obs_04_0081__section9125142514612"><h4 class="sectiontitle">Differences Between PUT and POST Methods</h4><p id="obs_04_0081__p154258324469">Parameters are passed through the request header if the PUT method is used to upload objects; if the POST method is used to upload objects, parameters are passed through the form field in the message body.</p>
<p id="obs_04_0081__p92971585546">With the PUT method, you need to specify the object name in the URL, but object name is not required with the POST method, which uses the bucket domain name as the URL. The request lines of the two methods are as follows:</p>
<pre class="screen" id="obs_04_0081__screen53331759111919">PUT /ObjectName HTTP/1.1</pre>
<pre class="screen" id="obs_04_0081__screen666703202019">POST / HTTP/1.1</pre>
<p id="obs_04_0081__p19165518576">For details about PUT upload, see <a href="obs_04_0080.html">Uploading Objects - PUT</a>.</p>
</div>
<div class="section" id="obs_04_0081__section28789840"><h4 class="sectiontitle">Versioning</h4><p class="msonormal" id="obs_04_0081__p21200411">If versioning is enabled for a bucket, the system automatically generates a unique version ID for the requested object in this bucket and returns the version ID in response header <strong id="obs_04_0081__b66290058">x-obs-version-id</strong>. If versioning is suspended for a bucket, the version ID of the requested object in this bucket is <strong id="obs_04_0081__b59739617">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>
<div class="section" id="obs_04_0081__section1475721115541"><h4 class="sectiontitle">WORM</h4><p id="obs_04_0081__p759131755418">If a bucket has WORM enabled, you can configure retention policies for objects in the bucket. You can specify the <strong id="obs_04_0081__b2129195454814">x-obs-object-lock-mode</strong> and <strong id="obs_04_0081__b171291954144819">x-obs-object-lock-retain-until-date</strong> headers to configure a retention policy when you upload an object. If you do not specify these two headers but have configured a default bucket-level WORM policy, this default policy automatically applies to the object newly uploaded. You can also configure or update a WORM retention policy for an existing object.</p>
<div class="note" id="obs_04_0081__note7133240105611"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="obs_04_0081__p1277512964714">When you enable WORM for a bucket, OBS automatically enables versioning for the bucket. WORM protects objects based on the object version IDs. Only object versions with any WORM retention policy configured will be protected. Assume that object <strong id="obs_04_0081__b15581831722">test.txt 001</strong> is protected by WORM. If another file with the same name is uploaded, a new object version <strong id="obs_04_0081__b281671813420">test.txt 002</strong> with no WORM policy configured will be generated. In such case, <strong id="obs_04_0081__b88165181049">test.txt 002</strong> is not protected and can be deleted. When you download an object without specifying a version ID, the current object version (<strong id="obs_04_0081__b15327114162416">test.txt 002</strong>) will be downloaded.</p>
</div></div>
</div>
<div class="section" id="obs_04_0081__section57781973"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0081__screen24019431"><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>
<span class="normal">24</span>
<span class="normal">25</span>
<span class="normal">26</span>
<span class="normal">27</span>
<span class="normal">28</span>
<span class="normal">29</span>
<span class="normal">30</span>
<span class="normal">31</span>
<span class="normal">32</span>
<span class="normal">33</span>
<span class="normal">34</span>
<span class="normal">35</span>
<span class="normal">36</span>
<span class="normal">37</span>
<span class="normal">38</span>
<span class="normal">39</span>
<span class="normal">40</span>
<span class="normal">41</span>
<span class="normal">42</span>
<span class="normal">43</span>
<span class="normal">44</span>
<span class="normal">45</span>
<span class="normal">46</span>
<span class="normal">47</span>
<span class="normal">48</span>
<span class="normal">49</span>
<span class="normal">50</span>
<span class="normal">51</span>
<span class="normal">52</span>
<span class="normal">53</span>
<span class="normal">54</span>
<span class="normal">55</span></pre></div></td><td class="code"><div><pre><span></span>POST<span class="w"> </span>/<span class="w"> </span>HTTP/1.1<span class="w"> </span>
Host:<span class="w"> </span>bucketname.obs.region.example.com
User-Agent:<span class="w"> </span>browser_data
Accept:<span class="w"> </span>file_types
Accept-Language:<span class="w"> </span>Regions
Accept-Encoding:<span class="w"> </span>encoding
Accept-Charset:<span class="w"> </span>character_set
Keep-Alive:<span class="w"> </span>300<span class="w"> </span>
Connection:<span class="w"> </span>keep-alive<span class="w"> </span>
Content-Type:<span class="w"> </span>multipart/form-data;<span class="w"> </span>boundary=9431149156168<span class="w"> </span>
Content-Length:<span class="w"> </span>length
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;key&quot;<span class="w"> </span>
acl<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;success_action_redirect&quot;
<span class="w"> </span>
success_redirect<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;content-Type&quot;<span class="w"> </span>
content_type<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;x-obs-meta-uuid&quot;<span class="w"> </span>
uuid<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;x-obs-meta-tag&quot;<span class="w"> </span>
metadata<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;AccessKeyId&quot;<span class="w"> </span>
access-key-id<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;policy&quot;<span class="w"> </span>
encoded_policy<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;signature&quot;<span class="w"> </span>
signature=<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;file&quot;;<span class="w"> </span>filename=&quot;MyFilename&quot;<span class="w"> </span>
Content-Type:<span class="w"> </span>image/jpeg<span class="w"> </span>
file_content<span class="w"> </span>
--9431149156168<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;submit&quot;<span class="w"> </span>
Upload<span class="w"> </span>to<span class="w"> </span>OBS<span class="w"> </span>
--9431149156168--
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section50275709"><h4 class="sectiontitle">Request Parameters</h4><p class="msonormal" id="obs_04_0081__p66525750">This request contains no parameters.</p>
</div>
<div class="section" id="obs_04_0081__section49828203"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="obs_04_0081__p19876694">This request uses common headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
<p class="msonormal" id="obs_04_0081__p66508399">If you want to get CORS configuration information, you must use the headers in <a href="#obs_04_0081__table45572552212656">Table 1</a>.</p>
<div class="tablenoborder"><a name="obs_04_0081__table45572552212656"></a><a name="table45572552212656"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0081__table45572552212656" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request headers for obtaining CORS configuration</caption><thead align="left"><tr id="obs_04_0081__row6497363"><th align="left" class="cellrowborder" valign="top" width="23.23%" id="mcps1.3.7.4.2.4.1.1"><p id="obs_04_0081__p56524405">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.7.4.2.4.1.2"><p id="obs_04_0081__p15074116">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.21%" id="mcps1.3.7.4.2.4.1.3"><p id="obs_04_0081__p13043879">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0081__row49921287"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.7.4.2.4.1.1 "><p id="obs_04_0081__p17092427">Origin</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.7.4.2.4.1.2 "><p id="obs_04_0081__p42309340">Origin of the cross-domain request specified by the pre-request. Generally, it is a domain name.</p>
<p id="obs_04_0081__p45239740">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="21.21%" headers="mcps1.3.7.4.2.4.1.3 "><p id="obs_04_0081__p40540330">Yes</p>
</td>
</tr>
<tr id="obs_04_0081__row29318658"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.7.4.2.4.1.1 "><p id="obs_04_0081__p26001129">Access-Control-Request-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.7.4.2.4.1.2 "><p id="obs_04_0081__p25716667">Indicates the HTTP headers of a request. The request can use multiple HTTP headers.</p>
<p id="obs_04_0081__p30123417">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="21.21%" headers="mcps1.3.7.4.2.4.1.3 "><p id="obs_04_0081__p24077689">No</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0081__section45800647"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="obs_04_0081__p4135802">This request uses form elements. <a href="#obs_04_0081__table13225554">Table 2</a> describes the form elements.</p>
<div class="tablenoborder"><a name="obs_04_0081__table13225554"></a><a name="table13225554"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0081__table13225554" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Form elements</caption><thead align="left"><tr id="obs_04_0081__row41460348"><th align="left" class="cellrowborder" valign="top" width="29.592959295929592%" id="mcps1.3.8.3.2.4.1.1"><p id="obs_04_0081__p2845010">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61.22612261226122%" id="mcps1.3.8.3.2.4.1.2"><p id="obs_04_0081__p60747054">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.180918091809183%" id="mcps1.3.8.3.2.4.1.3"><p id="obs_04_0081__p59861617">Mandatory</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0081__row16952842"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p31002967">file</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p62111634183715">Specifies the object content uploaded. Both the file name and file path are ignored and will not be used as the object name. The object name is the value of parameter <strong id="obs_04_0081__b11310191044215">key</strong>.</p>
<p id="obs_04_0081__p52585164">Type: binary content or text</p>
<p id="obs_04_0081__p3504431">Constraint: This parameter must be the last parameter in a form. Otherwise, parameters after this parameter will be all discarded. Additionally, each request contains only one file parameter.</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p15423498">Yes</p>
</td>
</tr>
<tr id="obs_04_0081__row4593755"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p36549892">key</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p7751245">Indicates the name of the object to be created.</p>
<p id="obs_04_0081__p2652341">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p13513041">Yes</p>
</td>
</tr>
<tr id="obs_04_0081__row54508512"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p53113338">AccessKeyId</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p7213141">Access key ID (AK) of the requester.</p>
<p id="obs_04_0081__p64918274">Type: string</p>
<p id="obs_04_0081__p47393561">Constraint: This parameter is mandatory if there is security policy parameter <strong id="obs_04_0081__b11506155273815">policy</strong> or <strong id="obs_04_0081__b9108227394">signature</strong> in the request.</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p13673196">Yes when the constraint is met.</p>
</td>
</tr>
<tr id="obs_04_0081__row55949908"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p35648708">policy</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p1864216">Indicates the security policy in the request. For details about the policy format, see the policy format in <a href="obs_04_0012.html">Authentication of Signature Carried in the Table Uploaded Through a Browser</a>.</p>
<p id="obs_04_0081__p16777947">Type: string</p>
<p id="obs_04_0081__p13921113310250">Constraint: This parameter is mandatory if the bucket provides the <strong id="obs_04_0081__b124395484110">AccessKeyId</strong> (or <strong id="obs_04_0081__b1344218684110">signature</strong>).</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p16836481">Yes when the constraint is met.</p>
</td>
</tr>
<tr id="obs_04_0081__row026063319302"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p9260233123017">signature</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p1526019339302">Indicates a signature string calculated based on StringToSign.</p>
<p id="obs_04_0081__p106094963211">Type: string</p>
<p id="obs_04_0081__p19452104992617">Constraint: This parameter is mandatory if the bucket provides the <strong id="obs_04_0081__b47862516413">AccessKeyId</strong> (or <strong id="obs_04_0081__b47915253413">policy</strong>).</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p45121221183218">Yes when the constraint is met.</p>
</td>
</tr>
<tr id="obs_04_0081__row1411464215313"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p191141242135310">token</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p12955112314016">Specifies the AK, signature, and security policy of the request initiator. The priority of a token is higher than that of a specified AK, the request signature, and the security policy of the request initiator.</p>
<p id="obs_04_0081__p5114194213536">Type: string</p>
<p id="obs_04_0081__p110131685015">Example:</p>
<p id="obs_04_0081__p742117507500">In HTML: &lt;input type= "text" name="token" value="ak:signature:policy" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p9114242135313">No</p>
</td>
</tr>
<tr id="obs_04_0081__row23452063"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p20568952">x-obs-acl</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p6286194018409">When creating an object, you can add this message header to set the permission control policy for the object. The predefined common policies are as follows: <strong id="obs_04_0081__b842352706163726">private</strong>, <strong id="obs_04_0081__b842352706163733">public-read</strong>, <strong id="obs_04_0081__b842352706163742">public-read-write</strong>, <strong id="obs_04_0081__b842352706163752">public-read-delivered</strong>, and <strong id="obs_04_0081__b84235270616386">public-read-write-delivered</strong>.</p>
<p id="obs_04_0081__p64083493">Type: string</p>
<p id="obs_04_0081__p39880527">Examples:</p>
<p id="obs_04_0081__p23380424">In POLICY: {"acl": "public-read" }</p>
<p id="obs_04_0081__p9097225">In HTML: &lt;input type="text" name="acl" value="public-read" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p65786607">No</p>
</td>
</tr>
<tr id="obs_04_0081__row4410152019377"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p54102201376">x-obs-grant-read</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p1041152010375">When creating an object, you can use this header to grant all users in an account the permissions to read the object and obtain the object metadata.</p>
<p id="obs_04_0081__p036992924111">Type: string</p>
<p id="obs_04_0081__p20377112974111">Examples:</p>
<p id="obs_04_0081__p1638592915417">In POLICY: {'grant-read': 'id=domainId1' },</p>
<p id="obs_04_0081__p63921129194114">In HTML: &lt;input type="text" name="grant-read" value="id=domainId1" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p341182017372">No</p>
</td>
</tr>
<tr id="obs_04_0081__row97841629153720"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p2784192993712">x-obs-grant-read-acp</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p6913194219811">When creating an object, you can use this header to grant all users in an account the permission to obtain the object ACL.</p>
<p id="obs_04_0081__p49151332194119">Type: string</p>
<p id="obs_04_0081__p1592233214412">Examples:</p>
<p id="obs_04_0081__p393093224115">In POLICY: {"grant-read-acp": "id=domainId1" },</p>
<p id="obs_04_0081__p1293763284113">In HTML: &lt;input type="text" name="grant-read-acp" value="id=domainId1" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p9785429153711">No</p>
</td>
</tr>
<tr id="obs_04_0081__row8153268371"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p4151526163710">x-obs-grant-write-acp</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p94031856283">When creating an object, you can use this header to grant all users in an account the permission to write the object ACL.</p>
<p id="obs_04_0081__p79212366417">Type: string</p>
<p id="obs_04_0081__p1393019361411">Examples:</p>
<p id="obs_04_0081__p10939123614413">In POLICY: {"grant-write-acp": "id=domainId1" },</p>
<p id="obs_04_0081__p59500366415">In HTML: &lt;input type="text" name="grant-write-acp" value="id=domainId1" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p1316182618370">No</p>
</td>
</tr>
<tr id="obs_04_0081__row9388182319372"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p3389132314376">x-obs-grant-full-control</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p1914315101898">When creating an object, you can use this header to grant all users in an account the permissions to read the object, obtain the object metadata and ACL, and write the object ACL.</p>
<p id="obs_04_0081__p1284513399419">Type: string</p>
<p id="obs_04_0081__p1585473914116">Examples:</p>
<p id="obs_04_0081__p9863839104112">In POLICY: {"grant-full-control": "id=domainId1" },</p>
<p id="obs_04_0081__p387333954111">In HTML: &lt;input type="text" name="grant-full-control" value="id=domainId1" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p12389102314371">No</p>
</td>
</tr>
<tr id="obs_04_0081__row55208559"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p42708291">x-obs-storage-class</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p36819576">When creating an object, you can use this header to specify the storage class for the object. If you do not use this header, the object storage class is the default storage class of the bucket.</p>
<p id="obs_04_0081__p62940734">Type: string</p>
<p id="obs_04_0081__p14339210104117">Storage class value options: <strong id="obs_04_0081__b63442043145015">STANDARD</strong> (Standard), <strong id="obs_04_0081__b1344943125011">WARM</strong> (Warm), <strong id="obs_04_0081__b12344134365016">COLD</strong> (Cold). These values are case sensitive.</p>
<p id="obs_04_0081__p65034727">Examples:</p>
<p id="obs_04_0081__p48441636">In POLICY: {"storage-class": "STANDARD" },</p>
<p id="obs_04_0081__p33321540">In HTML: &lt;input type="text" name="x-obs-storage-class" value="STANDARD" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p14690238">No</p>
</td>
</tr>
<tr id="obs_04_0081__row65103281"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p38874400">Cache-Control,</p>
<p id="obs_04_0081__p14325287">Content-Type,</p>
<p id="obs_04_0081__p61818720">Content-Disposition,</p>
<p id="obs_04_0081__p19497574">Content-Encoding</p>
<p id="obs_04_0081__p92111354122920">Expires</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p35799650">Standard HTTP headers. OBS records those headers. If you download the object or send the HEAD Object request, those parameter values are returned.</p>
<p id="obs_04_0081__p53761394">Type: string</p>
<p id="obs_04_0081__p14090498">Examples:</p>
<p id="obs_04_0081__p59705619">In POLICY: ["starts-with", "$Content-Type", "text/"],</p>
<p id="obs_04_0081__p479662">In HTML: &lt;input type="text" name="content-type" value="text/plain" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p38852687">No</p>
</td>
</tr>
<tr id="obs_04_0081__row14129871"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p3668922">success_action_redirect</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p28747278">Indicates the address (URL) to which a successfully responded request is redirected.</p>
<ul id="obs_04_0081__ul57398910"><li id="obs_04_0081__li46828145">If the value is valid and the request is successful, OBS returns status code 303. <strong id="obs_04_0081__b50725990">Location</strong> contains <strong id="obs_04_0081__b8423527069138">success_action_redirect</strong> as well as the bucket name, object name, and object ETag.</li><li id="obs_04_0081__li18800129">If this parameter value is invalid, OBS ignores this parameter. In such case, the <strong id="obs_04_0081__b198741629194916">Location</strong> header is the object address, and OBS returns the response code based on whether the operation succeeds or fails.</li></ul>
<p id="obs_04_0081__p34983438">Type: string</p>
<p id="obs_04_0081__p46415489">Examples:</p>
<p id="obs_04_0081__p15086219">In POLICY: {"success_action_redirect": "http://123458.com"},</p>
<p id="obs_04_0081__p1558245">In HTML: &lt;input type="text" name="success_action_redirect" value="http://123458.com" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p59109014">No</p>
</td>
</tr>
<tr id="obs_04_0081__row62219078"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p6580564">x-obs-meta-*</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p63263715">Indicates user-defined metadata. When creating an object, you can use this header or a header starting with <strong id="obs_04_0081__b8423527069224">x-obs-meta-</strong> to define object metadata in an HTTP request. The user-defined metadata will be returned in the response when you retrieve the object or query the object metadata. </p>
<p id="obs_04_0081__p32502531">Type: string</p>
<p id="obs_04_0081__p24087323">Examples:</p>
<p id="obs_04_0081__p15459317">In POLICY: {" x-obs-meta-test ": " test metadata " },</p>
<p id="obs_04_0081__p4916131">In HTML: &lt;input type="text" name=" x-obs-meta-test " value=" test metadata " /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p62662307">No</p>
</td>
</tr>
<tr id="obs_04_0081__row27089856"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p46794728">success_action_status</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p32276637">Indicates the status code returned after the request is successfully received. Possible values are <strong id="obs_04_0081__b284402221202410">200</strong>, <strong id="obs_04_0081__b529823074202410">201</strong>, and <strong id="obs_04_0081__b905934136202410">204</strong>.</p>
<ul id="obs_04_0081__ul22054279"><li id="obs_04_0081__li64270790">If this parameter is set to <strong id="obs_04_0081__b16937216511">200</strong> or <strong id="obs_04_0081__b2909114105110">204</strong>, the body in the OBS response message is empty.</li><li id="obs_04_0081__li41566202">If this parameter is set to <strong id="obs_04_0081__b1746731525119">201</strong>, the OBS response message contains an XML document that describes the response to the request.</li><li id="obs_04_0081__li38551500">If the value is not set or if it is set to an invalid value, the OBS returns an empty document with a 204 status code.</li></ul>
<p id="obs_04_0081__p11419181">Type: string</p>
<p id="obs_04_0081__p35663766">Examples:</p>
<p id="obs_04_0081__p52538440">In POLICY: ["starts-with", "$success_action_status", ""],</p>
<p id="obs_04_0081__p3083916">In HTML: &lt;input type="text" name="success_action_status" value="200" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p48470680">No</p>
</td>
</tr>
<tr id="obs_04_0081__row33582936"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p35863325">x-obs-website-redirect-location</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p19248235">If a bucket is configured with the static website hosting function, it will redirect requests for this object to another object in the same bucket or to an external URL. OBS stores the value of this header in the object metadata.</p>
<p id="obs_04_0081__p39016388">Default value: none</p>
<p id="obs_04_0081__p15603177">Constraint: The value must be prefixed by a slash (/), <strong id="obs_04_0081__b22143991">http://</strong>, or <strong id="obs_04_0081__b65078196">https://</strong>. The length of the value cannot exceed 2 KB.</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p55897791">No</p>
</td>
</tr>
<tr id="obs_04_0081__row33318075"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p14409545">x-obs-server-side-encryption</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p26322500">Indicates that SSE-KMS is used. </p>
<p id="obs_04_0081__p35575909">Type: string</p>
<p id="obs_04_0081__p51747731">Example: <strong id="obs_04_0081__b1282013216483">x-obs-server-side-encryption:kms</strong></p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p30816671">No. This header is required when SSE-KMS is used.</p>
</td>
</tr>
<tr id="obs_04_0081__row8914583"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p50992584">x-obs-server-side-encryption-kms-key-id</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p36758634">Master key ID. This header is used in SSE-KMS mode. If the customer does not provide the master key ID, the default master key ID will be used. If there is no such a default master key, OBS will create one and use it by default.</p>
<p id="obs_04_0081__p62392252">Type: string</p>
<p id="obs_04_0081__p6679135313114">The following two formats are supported:</p>
<p id="obs_04_0081__p1611719113354">- <em id="obs_04_0081__i154601762610">regionID</em><strong id="obs_04_0081__b4466461668">:</strong><em id="obs_04_0081__i1546614614617">domainID</em><strong id="obs_04_0081__b846796669">:key/</strong><em id="obs_04_0081__i1446714613614">key_id</em></p>
<p id="obs_04_0081__p090816596123">2. <em id="obs_04_0081__i18551125817236">key_id</em></p>
<p id="obs_04_0081__p558627121315"><em id="obs_04_0081__i29588389120">regionID</em> indicates the ID of the region where the key belongs. <em id="obs_04_0081__i49582382110">domainID</em> indicates the ID of the tenant where the key belongs. <em id="obs_04_0081__i179585388117">key_id</em> indicates the ID of the key created in KMS.</p>
<p id="obs_04_0081__p17830152818144">Examples:</p>
<p id="obs_04_0081__p132512298431">- x-obs-server-side-encryption-kms-key-id: <em id="obs_04_0081__i12729730105712">region</em>:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</p>
<p id="obs_04_0081__p82717299438">- x-obs-server-side-encryption-kms-key-id:4f1cd4de-ab64-4807-920a-47fc42e7f0d0</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p51251487">No</p>
</td>
</tr>
<tr id="obs_04_0081__row58610204"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p49806107">x-obs-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p7762862">Encryption algorithm. The header is used in SSE-C mode.</p>
<p id="obs_04_0081__p2756899">Type: string</p>
<p id="obs_04_0081__p24812094">Example: <strong id="obs_04_0081__b187361227144816">x-obs-server-side-encryption-customer-algorithm:AES256</strong></p>
<p id="obs_04_0081__p21982256">Constraint: This header must be used together with <strong id="obs_04_0081__b19411028195615">x-obs-server-side-encryption-customer-key</strong> and <strong id="obs_04_0081__b8151835155620">x-obs-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p35732293">No. This header is required when SSE-C is used.</p>
</td>
</tr>
<tr id="obs_04_0081__row53155187"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p10602856">x-obs-server-side-encryption-customer-key</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p53524985">A key used to encrypt objects. The header is used in SSE-C mode. This key is used to encrypt objects.</p>
<p id="obs_04_0081__p11962824">Type: string</p>
<p id="obs_04_0081__p40556560">Example: <strong id="obs_04_0081__b27141632184812">x-obs-server-side-encryption-customer-key:K7QkYpBkM5+hca27fsNkUnNVaobncnLht/rCB2o/9Cw=</strong></p>
<p id="obs_04_0081__p29464720">Constraint: This header is a Base64-encoded 256-bit key and must be used together with <strong id="obs_04_0081__b229663555717">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0081__b229633515712">x-obs-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p37832104">No. This header is required when SSE-C is used.</p>
</td>
</tr>
<tr id="obs_04_0081__row4944617"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p64969725">x-obs-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p28056373">Indicates the MD5 value of a key used to encrypt objects. The header is used in SSE-C mode. The MD5 value is used to check whether any error occurs during the transmission of the key.</p>
<p id="obs_04_0081__p51180770">Type: string</p>
<p id="obs_04_0081__p57973754">Example: <strong id="obs_04_0081__b13356123716486">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
<p id="obs_04_0081__p52001740">Constraint: This header is a Base64-encoded 128-bit MD5 value and must be used together with <strong id="obs_04_0081__b588718591570">x-obs-server-side-encryption-customer-algorithm</strong> and <strong id="obs_04_0081__b118941659175719">x-obs-server-side-encryption-customer-key</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p51391439">No. This header is required when SSE-C is used.</p>
</td>
</tr>
<tr id="obs_04_0081__row7583033195917"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p1514215711573">x-obs-expires</p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p6876185903819">Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted. (The calculation starts from when the object was last modified).</p>
<p id="obs_04_0081__p133831235577">Type: integer</p>
<p id="obs_04_0081__p638302312574">Example: <strong id="obs_04_0081__b142574419485">x-obs-expires:3</strong></p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p1014357105719">No</p>
</td>
</tr>
<tr id="obs_04_0081__row0719551723"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p5180191819182"><span style="color:#494949;">x-obs-object-lock-mode</span></p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p6180918151813">WORM mode that will be applied to the object. Currently, only <strong id="obs_04_0081__b1513901610123">COMPLIANCE</strong> is supported. This header must be used together with <strong id="obs_04_0081__b6139161618121">x-obs-object-lock-retain-until-date</strong>.</p>
<p id="obs_04_0081__p14496145181918">Type: string</p>
<p id="obs_04_0081__p154228537191">Example: <strong id="obs_04_0081__b1443645174916">x-obs-object-lock-mode:COMPLIANCE</strong></p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p2180181810184">No, but required when <strong id="obs_04_0081__b8517161919916">x-obs-object-lock-retain-until-date</strong> is present.</p>
</td>
</tr>
<tr id="obs_04_0081__row135301381229"><td class="cellrowborder" valign="top" width="29.592959295929592%" headers="mcps1.3.8.3.2.4.1.1 "><p id="obs_04_0081__p14809920131812"><span style="color:#494949;">x-obs-object-lock-retain-until-date</span></p>
</td>
<td class="cellrowborder" valign="top" width="61.22612261226122%" headers="mcps1.3.8.3.2.4.1.2 "><p id="obs_04_0081__p97201718162111">Indicates the expiration time of the Object Lock retention. The value must be a UTC time that complies with ISO 8601, for example, <strong id="obs_04_0081__b1071012402281">2015-07-01T04:11:15Z</strong>. This header must be used together with <strong id="obs_04_0081__b107108402286">x-obs-object-lock-mode</strong>.</p>
<p id="obs_04_0081__p1972081822113">Type: string</p>
<p id="obs_04_0081__p372031872119">Example: <strong id="obs_04_0081__b1953135414913">x-obs-object-lock-retain-until-date:2015-07-01T04:11:15Z</strong></p>
</td>
<td class="cellrowborder" valign="top" width="9.180918091809183%" headers="mcps1.3.8.3.2.4.1.3 "><p id="obs_04_0081__p080992031813">No, but required when <strong id="obs_04_0081__b13754185712495">x-obs-object-lock-mode</strong> is present.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0081__section9552642"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0081__screen35771416105"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
Content-Type:<span class="w"> </span>application/xml<span class="w"> </span>
Location:<span class="w"> </span>location
Date:<span class="w"> </span>date
ETag:<span class="w"> </span>etag
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section18864917"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0081__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 class="msonormal" id="obs_04_0081__p15525038">In addition to the common response headers, the following message headers may also be used. For details, see <a href="#obs_04_0081__table35215532173747">Table 3</a>.</p>
<div class="tablenoborder"><a name="obs_04_0081__table35215532173747"></a><a name="table35215532173747"></a><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0081__table35215532173747" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Additional response headers</caption><thead align="left"><tr id="obs_04_0081__row9381568"><th align="left" class="cellrowborder" valign="top" width="40.400000000000006%" id="mcps1.3.10.4.2.3.1.1"><p id="obs_04_0081__p21709532">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.599999999999994%" id="mcps1.3.10.4.2.3.1.2"><p id="obs_04_0081__p13641628">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="obs_04_0081__row31230056"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p46606633">x-obs-version-id</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p17040967">Object version ID. If versioning is enabled for the bucket, the object version ID will be returned. A string <strong id="obs_04_0081__b19150980">null</strong> will be returned if the bucket housing the object has versioning suspended.</p>
<p id="obs_04_0081__p38141097">Type: string</p>
</td>
</tr>
<tr id="obs_04_0081__row7725560"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p21790587">Access-Control-Allow-Origin</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p20207160">Indicates that the origin is included in the response if the origin in the request meets the CORS configuration requirements when CORS is configured for buckets.</p>
<p id="obs_04_0081__p47646715">Type: string</p>
</td>
</tr>
<tr id="obs_04_0081__row26167253"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p39172730">Access-Control-Allow-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p18874576">Indicates that the headers are included in the response if headers in the request meet the CORS configuration requirements when CORS is configured for buckets.</p>
<p id="obs_04_0081__p35653461">Type: string</p>
</td>
</tr>
<tr id="obs_04_0081__row52445694"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p20242861">Access-Control-Max-Age</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p29059077">Indicates MaxAgeSeconds in the CORS configuration of the server when CORS is configured for buckets.</p>
<p id="obs_04_0081__p60205103">Type: integer</p>
</td>
</tr>
<tr id="obs_04_0081__row4975021"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p323533">Access-Control-Allow-Methods</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p26206222">Indicates that methods in the rule are included in the response if Access-Control-Request-Method in the request meets the CORS configuration requirements when CORS is configured for buckets.</p>
<p id="obs_04_0081__p34529410">Type: string</p>
<p id="obs_04_0081__p42329239">Value options: <strong id="obs_04_0081__b9364820154710">GET</strong>, <strong id="obs_04_0081__b636532020477">PUT</strong>, <strong id="obs_04_0081__b163651520114710">HEAD</strong>, <strong id="obs_04_0081__b3365520134710">POST</strong>, <strong id="obs_04_0081__b1436532010472">DELETE</strong></p>
</td>
</tr>
<tr id="obs_04_0081__row45418839"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p55047328">Access-Control-Expose-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p29648582">Value of <strong id="obs_04_0081__b5281387458">ExposeHeader</strong> in the CORS configuration of a server when CORS is configured for buckets.</p>
<p id="obs_04_0081__p65510647">Type: string</p>
</td>
</tr>
<tr id="obs_04_0081__row52724912"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p42859462">x-obs-server-side-encryption</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p49064434">This header is included in a response if SSE-KMS is used.</p>
<p id="obs_04_0081__p38926722">Type: string</p>
<p id="obs_04_0081__p14796185">Example: <strong id="obs_04_0081__b73456453488">x-obs-server-side-encryption:kms</strong></p>
</td>
</tr>
<tr id="obs_04_0081__row66056807"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p49001173">x-obs-server-side-encryption-kms-key-id</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p9672051">Indicates the master key ID. This header is included in a response if SSE-KMS is used.</p>
<p id="obs_04_0081__p10474191820349">Type: string</p>
<p id="obs_04_0081__p11972162218372">Format: <em id="obs_04_0081__i1422015107616">regionID</em><strong id="obs_04_0081__b132269109613">:</strong><em id="obs_04_0081__i1322613101361">domainID</em><strong id="obs_04_0081__b822651018619">:key/</strong><em id="obs_04_0081__i1222619101665">key_id</em></p>
<p id="obs_04_0081__p204741187343"><em id="obs_04_0081__i8413350917">regionID</em> indicates the ID of the region where the key belongs. <em id="obs_04_0081__i19413150513">domainID</em> indicates the ID of the tenant where the key belongs. <em id="obs_04_0081__i3413105018120">key_id</em> indicates the key ID used in this encryption.</p>
<p id="obs_04_0081__p15700125810436">Example: <strong id="obs_04_0081__b126748715146">x-obs-server-side-encryption-kms-key-id:</strong><em id="obs_04_0081__i11371151945112">region</em><strong id="obs_04_0081__b8976111051416">:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</strong></p>
</td>
</tr>
<tr id="obs_04_0081__row45238633"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p40450656">x-obs-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p55277695">Indicates an encryption algorithm. This header is included in a response if SSE-C is used.</p>
<p id="obs_04_0081__p27737214">Type: string</p>
<p id="obs_04_0081__p48308335">Example: <strong id="obs_04_0081__b3594755104812">x-obs-server-side-encryption-customer-algorithm:AES256</strong></p>
</td>
</tr>
<tr id="obs_04_0081__row32121837"><td class="cellrowborder" valign="top" width="40.400000000000006%" headers="mcps1.3.10.4.2.3.1.1 "><p id="obs_04_0081__p51731993">x-obs-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="59.599999999999994%" headers="mcps1.3.10.4.2.3.1.2 "><p id="obs_04_0081__p29541865">Indicates the MD5 value of a key used to encrypt objects. This header is included in a response if SSE-C is used.</p>
<p id="obs_04_0081__p64550194">Type: string</p>
<p id="obs_04_0081__p44080837">Example: <strong id="obs_04_0081__b376433498">x-obs-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="obs_04_0081__section35566529"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0081__p13778070">This response involves no elements.</p>
</div>
<div class="section" id="obs_04_0081__section51663312"><h4 class="sectiontitle">Error Responses</h4><p class="msonormal" id="obs_04_0081__p42281924">No special error responses are returned. For details about error responses, see <a href="obs_04_0115.html#obs_04_0115__d0e843">Table 2</a>.</p>
</div>
<div class="section" id="obs_04_0081__section14482163815396"><h4 class="sectiontitle">Sample Request: Uploading an Object Using POST</h4><div class="codecoloring" codetype="Xml" id="obs_04_0081__screen8484163863919"><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>
<span class="normal">24</span>
<span class="normal">25</span>
<span class="normal">26</span>
<span class="normal">27</span>
<span class="normal">28</span>
<span class="normal">29</span>
<span class="normal">30</span>
<span class="normal">31</span>
<span class="normal">32</span>
<span class="normal">33</span>
<span class="normal">34</span>
<span class="normal">35</span>
<span class="normal">36</span>
<span class="normal">37</span>
<span class="normal">38</span>
<span class="normal">39</span>
<span class="normal">40</span>
<span class="normal">41</span>
<span class="normal">42</span>
<span class="normal">43</span>
<span class="normal">44</span>
<span class="normal">45</span>
<span class="normal">46</span>
<span class="normal">47</span>
<span class="normal">48</span>
<span class="normal">49</span>
<span class="normal">50</span>
<span class="normal">51</span>
<span class="normal">52</span>
<span class="normal">53</span>
<span class="normal">54</span>
<span class="normal">55</span>
<span class="normal">56</span>
<span class="normal">57</span>
<span class="normal">58</span>
<span class="normal">59</span>
<span class="normal">60</span>
<span class="normal">61</span>
<span class="normal">62</span></pre></div></td><td class="code"><div><pre><span></span>POST<span class="w"> </span>/<span class="w"> </span>HTTP/1.1
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>04:15:23<span class="w"> </span>GMT
Host:<span class="w"> </span>examplebucket.obs.region.example.com
Content-Type:<span class="w"> </span>multipart/form-data;<span class="w"> </span>boundary=7db143f50da2
Content-Length:<span class="w"> </span>2424
Origin:<span class="w"> </span>www.example.com
Access-Control-Request-Headers:acc_header_1
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;key&quot;
object01
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;acl&quot;
public-read
--7db143f50da2<span class="w"> </span>
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;content-type&quot;
text/plain
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;expires&quot;
WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>04:16:15<span class="w"> </span>GMT
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;AccessKeyId&quot;
14RZT432N80TGDF2Y2G2
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;policy&quot;
ew0KICAiZXhaaXJhdGlvbiI6ICIyMDE1LTA3LTAxVDEyOjAwOjAwLjAwMFoiLA0KICAiY29uZGl0aW9ucyI6IFsNCiAgICB7ImJ1Y2tldCI6ICJleG1hcGxlYnVja2V0IiB9LA0KICAgIHsiYWNsIjogInB1YmxpYy1yZWFkIiB9LA0KICAgIHsiRXhaaXJlcyI6ICIxMDAwIiB9LA0KICAgIFsiZXEiLCAiJGtleSIsICJvYmplY3QwMSJdLA0KICAgIFsic3RhcnRzLXdpdGgiLCAiJENvbnRlbnQtVHlwZSIsICJ0ZXh0LyJdLA0KICBdDQp9DQo=
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;signature&quot;
Vk6rwO0Nq09BLhvNSIYwSJTRQ+k=
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;x-obs-persistent-headers&quot;
<span class="w"> </span>
test:dmFsdWUx
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;x-obs-grant-read&quot;
<span class="w"> </span>
id=52f24s3593as5730ea4f722483579xxx
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;x-obs-server-side-encryption&quot;
<span class="w"> </span>
kms
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;x-obs-website-redirect-location&quot;
<span class="w"> </span>
http://www.example.com/
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;file&quot;;<span class="w"> </span>filename=&quot;C:\Testtools\UpLoadFiles\object\1024Bytes.txt&quot;
Content-Type:<span class="w"> </span>text/plain
01234567890
--7db143f50da2
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;submit&quot;
Upload
--7db143f50da2--
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section76081155815"><h4 class="sectiontitle">Sample Response: Uploading an Object Using POST</h4><p id="obs_04_0081__p1672012407193">After CORS is configured for a bucket, the response contains the <strong id="obs_04_0081__b875111155611">Access-Control-*</strong> information.</p>
<div class="codecoloring" codetype="Xml" id="obs_04_0081__screen8485113814"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>204<span class="w"> </span>No<span class="w"> </span>Content
x-obs-request-id:<span class="w"> </span>90E2BA00C26C00000133B442A90063FD
x-obs-id-2:<span class="w"> </span>OTBFMkJBMDBDMjZDMDAwMDAxMzNCNDQyQTkwMDYzRkRBQUFBQUFBQWJiYmJiYmJi
Access-Control-Allow-Origin:<span class="w"> </span>www.example.com
Access-Control-Allow-Methods:<span class="w"> </span>POST,GET,HEAD,PUT
Access-Control-Allow-Headers:<span class="w"> </span>acc_header_01
Access-Control-Max-Age:<span class="w"> </span>100
Access-Control-Expose-Headers:<span class="w"> </span>exp_header_01
Content-Type:<span class="w"> </span>text/xml
Location:<span class="w"> </span>http://examplebucket.obs.region.example.com/object01
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>04:15:23<span class="w"> </span>GMT
ETag:<span class="w"> </span>&quot;ab7abb0da4bca5323ab6119bb5dcd296&quot;
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section392181218378"><h4 class="sectiontitle">Sample Request: Uploading an Object (with <strong id="obs_04_0081__b862018125216">x-obs-acl</strong> and a Storage Class Specified)</h4><p id="obs_04_0081__p10361460163"><strong id="obs_04_0081__b12283193111717">Upload an object with the </strong><strong id="obs_04_0081__b1268922113589">x-obs-acl</strong><strong id="obs_04_0081__b1328414314174">, storage class, and redirection header fields carried in the request message.</strong></p>
<p id="obs_04_0081__p17861838134017">Before encoding, the policy content is as follows:</p>
<div class="codecoloring" codetype="Xml" id="obs_04_0081__screen2041324410401"><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>
<span class="normal">24</span>
<span class="normal">25</span>
<span class="normal">26</span>
<span class="normal">27</span></pre></div></td><td class="code"><div><pre><span></span>{
<span class="w"> </span>&quot;expiration&quot;:&quot;2018-07-17T04:54:35Z&quot;,
<span class="w"> </span>&quot;conditions&quot;:[
<span class="w"> </span>{
<span class="w"> </span>&quot;content-type&quot;:&quot;text/plain&quot;
<span class="w"> </span>},
<span class="w"> </span>{
<span class="w"> </span>&quot;x-obs-storage-class&quot;:&quot;WARM&quot;
<span class="w"> </span>},
<span class="w"> </span>{
<span class="w"> </span>&quot;success_action_redirect&quot;:&quot;http://www.example.com&quot;
<span class="w"> </span>},
<span class="w"> </span>{
<span class="w"> </span>&quot;x-obs-acl&quot;:&quot;public-read&quot;
<span class="w"> </span>},
<span class="w"> </span>[
<span class="w"> </span>&quot;starts-with&quot;,
<span class="w"> </span>&quot;$bucket&quot;,
<span class="w"> </span>&quot;&quot;
<span class="w"> </span>],
<span class="w"> </span>[
<span class="w"> </span>&quot;starts-with&quot;,
<span class="w"> </span>&quot;$key&quot;,
<span class="w"> </span>&quot;&quot;
<span class="w"> </span>]
<span class="w"> </span>]
}
</pre></div></td></tr></table></div>
</div>
<p id="obs_04_0081__p227118101816">Sample request:</p>
<div class="codecoloring" codetype="Xml" id="obs_04_0081__screen1792131223715"><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>
<span class="normal">24</span>
<span class="normal">25</span>
<span class="normal">26</span>
<span class="normal">27</span>
<span class="normal">28</span>
<span class="normal">29</span>
<span class="normal">30</span>
<span class="normal">31</span>
<span class="normal">32</span>
<span class="normal">33</span>
<span class="normal">34</span>
<span class="normal">35</span>
<span class="normal">36</span>
<span class="normal">37</span>
<span class="normal">38</span>
<span class="normal">39</span></pre></div></td><td class="code"><div><pre><span></span>POST<span class="w"> </span>/<span class="w"> </span>HTTP/1.1
Host:<span class="w"> </span>examplebucket.obs.region.example.com
Accept-Encoding:<span class="w"> </span>identity
Content-Length:<span class="w"> </span>947
Content-Type:<span class="w"> </span>multipart/form-data;<span class="w"> </span>boundary=9431149156168
User-Agent:<span class="w"> </span>OBS/Test
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;x-obs-acl&quot;
public-read
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;AccessKeyId&quot;
H4IPJX0TQTHTHEBQQCEC
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;key&quot;
my-obs-object-key-demo
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;signature&quot;
WNwv8P1ZiWdqPQqjXeLmAfzPDAI=
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;policy&quot;
eyJleHBpcmF0aW9uIjoiMjAxOC0wNy0xN1QwODozNDoyM1oiLCAiY29uZGl0aW9ucyI6W3siY29udGVudC10eXBlIjoidGV4dC9wbGFpbiJ9LHsieC1vYnMtYWNsIjoicHVibGljLXJlYWQifSxbInN0YXJ0cy13aXRoIiwgIiRidWNrZXQiLCAiIl0sWyJzdGFydHMtd2l0aCIsICIka2V5IiwgIiJdXX0=
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;content-type&quot;
text/plain
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;file&quot;;<span class="w"> </span>filename=&quot;myfile&quot;
Content-Type:<span class="w"> </span>text/plain
c2c6cd0f-898e-11e8-aab6-e567c91fb541
52b8e8a0-8481-4696-96f3-910635215a78
--9431149156168--
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section1999141253715"><h4 class="sectiontitle">Sample Response: Uploading an Object (with <strong id="obs_04_0081__b1353410111491">x-obs-acl</strong> and a Storage Class Specified)</h4><div class="codecoloring" codetype="Xml" id="obs_04_0081__screen1013151314377"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>204<span class="w"> </span>No<span class="w"> </span>Content
Server:<span class="w"> </span>OBS
Location:<span class="w"> </span>http://examplebucket.obs.region.example.com/my-obs-object-key-demo
ETag:<span class="w"> </span>&quot;17a83fc8d431273405bd266114b7e034&quot;
x-obs-request-id:<span class="w"> </span>5DEB00000164A728A7C7F4E032214CFA
x-obs-id-2:<span class="w"> </span>32AAAUJAIAABAAAQAAEAABAAAQAAEAABCSwj2PcBE0YcoLHUDO7GSj+rVByzjflA
Date:<span class="w"> </span>Tue,<span class="w"> </span>17<span class="w"> </span>Jul<span class="w"> </span>2018<span class="w"> </span>07:33:36<span class="w"> </span>GMT
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section430011014337"><h4 class="sectiontitle">Sample Request: Using a Token for Authentication</h4><div class="codecoloring" codetype="Xml" id="obs_04_0081__screen312815284210"><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></pre></div></td><td class="code"><div><pre><span></span>POST<span class="w"> </span>/<span class="w"> </span>HTTP/1.1
Content-Type:multipart/form-data;<span class="w"> </span>boundary=9431149156168
Content-Length:<span class="w"> </span>634
Host:<span class="w"> </span>examplebucket.obs.region.example.com
<span class="w"> </span>
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;key&quot;
obj01
<span class="w"> </span>
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;token&quot;
UDSIAMSTUBTEST002538:XsVcTzR2/A284oE4VH9qPndGcuE=:eyJjb25kaXRpb25zIjogW3siYnVja2V0IjogInRlc3QzMDAzMDU4NzE2NjI2ODkzNjcuMTIifSwgeyJDb250ZW50LVR5cGUiOiAiYXBwbGljYXRpb24veG1sIn0sIFsiZXEiLCAiJGtleSIsICJvYmoudHh0Il1dLCAiZXhwaXJhdGlvbiI6ICIyMDIyLTA5LTA5VDEyOjA5OjI3WiJ9
<span class="w"> </span>
--9431149156168
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;file&quot;;<span class="w"> </span>filename=&quot;myfile&quot;
Content-Type:<span class="w"> </span>text/plain
01234567890
<span class="w"> </span>
--9431149156168--
Content-Disposition:<span class="w"> </span>form-data;<span class="w"> </span>name=&quot;submit&quot;
Upload<span class="w"> </span>to<span class="w"> </span>OBS
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section47211218103213"><h4 class="sectiontitle">Sample Response: Using a Token for Authentication</h4><div class="codecoloring" codetype="Xml" id="obs_04_0081__screen13186124813488"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>204<span class="w"> </span>No<span class="w"> </span>Content
Server:<span class="w"> </span>OBS
Location:<span class="w"> </span>http://examplebucket.obs.region.example.com/my-obs-object-key-demo
ETag:<span class="w"> </span>&quot;7eda50a430fed940023acb9c4c6a2fff&quot;
x-obs-request-id:<span class="w"> </span>000001832010443D80F30B649B969C47
x-obs-id-2:<span class="w"> </span>32AAAUgAIAABAAAQAAEAABAAAQAAEAABCTj0yO9KJd5In+i9pzTgCDVG9vMnk7O/
Date:<span class="w"> </span>Fri,09Sep<span class="w"> </span>2022<span class="w"> </span>02:<span class="w"> </span>24:40<span class="w"> </span>GMT
</pre></div></td></tr></table></div>
</div>
</div>
<div class="section" id="obs_04_0081__section29219401538"><h4 class="sectiontitle">Sample Request: Specifying an Object Expiration Time</h4><pre class="screen" id="obs_04_0081__screen4136194018535">POST / HTTP/1.1
Date: WED, 01 Jul 2015 04:15:23 GMT
Host: examplebucket.obs.<em id="obs_04_0081__i17150161818212">region</em>.example.com
Content-Type: multipart/form-data; boundary=148828969260233905620870
Content-Length: 1639
Origin: www.example.com
Access-Control-Request-Headers:acc_header_1
--148828969260233905620870
Content-Disposition: form-data; name="key"
object01
--148828969260233905620870
Content-Disposition: form-data; name="AwsAccessKeyId"
55445349414d5354554254455354303030303033
--148828969260233905620870
Content-Disposition: form-data; name="signature"
396246666f6f42793872792f7a3958524f6c44334e4e69763950553d--7db143f50da2
--148828969260233905620870
Content-Disposition: form-data; name="policy"
65794a6c65484270636d463061573975496a6f694d6a41794d7930774e6930784e565178...
--148828969260233905620870
Content-Disposition: form-data; name="x-obs-expires"
4
--148828969260233905620870
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain
01234567890
--148828969260233905620870
Content-Disposition: form-data; name="submit"
Upload
--148828969260233905620870--</pre>
</div>
<div class="section" id="obs_04_0081__section179615402535"><h4 class="sectiontitle">Sample Response: Specifying an Object Expiration Time</h4><pre class="screen" id="obs_04_0081__screen513634017536">
HTTP/1.1 204 No Content
Server: OBS
Date: Thu, 15 Jun 2023 12:39:03 GMT
Connection: keep-alive
Location: http://examplebucket.obs.<em id="obs_04_0081__i563154218215">region</em>.example.com/my-obs-object-key-demo
x-obs-expiration: expiry-date="Tue, 20 Jun 2023 00:00:00 GMT"
ETag: "d41d8cd98f00b204e9800998ecf8427e"
x-obs-request-id: 00000188BF11049553064911000FC30D
x-obs-id-2: 32AAAUJAIAABAAAQAAEAABAAAQAAEAABCSwj2PcBE0YcoLHUDO7GSj+rVByzjflA
x-forward-status: 0x40020000000001
x-dae-api-type: REST.POST.OBJECT</pre>
</div>
<div class="section" id="obs_04_0081__section199604065313"><h4 class="sectiontitle">Sample Request: Specifying a Status Code</h4><p id="obs_04_0081__p1613734065313"><strong id="obs_04_0081__b11893418183818">Set the status code of a successful action to 200.</strong></p>
<pre class="screen" id="obs_04_0081__screen1113774010531">POST /srcbucket HTTP/1.1
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Postman-Token: 667dcc44-1c48-41ba-9e41-9f87d8975089
Host: obs.<em id="obs_04_0081__i168241151529">region</em>.example.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------285613759795901770404350
Content-Length: 1134
----------------------------285613759795901770404350
Content-Disposition: form-data; name="key"
obj
----------------------------285613759795901770404350
Content-Disposition: form-data; name="AwsAccessKeyId"
XXXXXXXXXXXXXXX000003
----------------------------285613759795901770404350
Content-Disposition: form-data; name="signature"
9rc4bVhDPQ7eHtw17hWtYxLnBWU=
----------------------------285613759795901770404350
Content-Disposition: form-data; name="policy"
eyJleHBpcmF0aW9uIjoiMjAyMy0wNi0xNVQxNDoxMTozNFoiLCAiY29uZGl0aW9ucyI6W3siYnVja2V0Ijoic3JjYnVja2V0MiJ9LHsic3VjY2Vzc19hY3Rpb25fc3RhdHVzIjoiMjAwIn0seyJjb250ZW50LXR5cGUiOiJ0ZXh0L3BsYWluIn0seyJrZXkiOiIzMzMifSxdfQ==
----------------------------285613759795901770404350
Content-Disposition: form-data; name="success_action_status"
200
----------------------------285613759795901770404350
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain
----------------------------285613759795901770404350
Content-Disposition: form-data; name="submit"
Upload to OBS
----------------------------285613759795901770404350--</pre>
</div>
<div class="section" id="obs_04_0081__section299114025312"><h4 class="sectiontitle">Sample Response: Specifying a Status Code</h4><p id="obs_04_0081__p73286258157"><strong id="obs_04_0081__b7594221193613">Response to the configuration of success status code 200</strong></p>
<pre class="screen" id="obs_04_0081__screen17137174011533">HTTP/1.1 200 OK
Server: OBS
Date: Thu, 15 Jun 2023 13:12:51 GMT
Content-Length: 0
Connection: keep-alive
Location: http://obs.<em id="obs_04_0081__i573845820211">region</em>.example.com/srcbucket/obj
ETag: "d41d8cd98f00b204e9800998ecf8427e"
x-obs-request-id: 00000188BF2FF55F5306426E000FE366
x-obs-id-2: 32AAAUJAIAABAAAQAAEAABAAAQAAEAABCScDjcXgZ7oMYSVnZnk4+HrClVwLVPTi
x-forward-status: 0x40020000000001
x-dae-api-type: REST.POST.OBJECT</pre>
</div>
<div class="section" id="obs_04_0081__section1299154075311"><h4 class="sectiontitle">Sample Request: Configuring a WORM Retention Policy When Uploading an Object</h4><pre class="screen" id="obs_04_0081__screen16138124035319">POST /srcbucket HTTP/1.1
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Postman-Token: 4c2f4c7e-2e0b-46c0-b1a7-4a5da560b6a1
Host: obs.<em id="obs_04_0081__i76414712313">region</em>.example.com
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=--------------------------940435396775653808840608
Content-Length: 1409
----------------------------940435396775653808840608
Content-Disposition: form-data; name="key"
obj
----------------------------940435396775653808840608
Content-Disposition: form-data; name="AwsAccessKeyId"
XXXXXXXXXXXXXXX000003
----------------------------940435396775653808840608
Content-Disposition: form-data; name="signature"
X/7QiyMYUvxUWk0R5fToeTcgMMU=
----------------------------940435396775653808840608
Content-Disposition: form-data; name="policy"
eyJleHBpcmF0aW9uIjoiMjAyMy0wNi0xNVQxNDoyMjo1MVoiLCAiY29uZGl0aW9ucyI6W3sieC1vYnMtb2JqZWN0LWxvY2stcmV0YWluLXVudGlsLWRhdGUiOiJUaHUsIDIwIEp1biAyMDIzIDEzOjEyOjUxIEdNVCJ9LHsieC1vYnMtb2JqZWN0LWxvY2stbW9kZSI6IkNPTVBMSUFOQ0UifSx7ImJ1Y2tldCI6InNyY2J1Y2tldDIifSx7ImNvbnRlbnQtdHlwZSI6InRleHQvcGxhaW4ifSx7ImtleSI6IjMzMyJ9LF19
----------------------------940435396775653808840608
Content-Disposition: form-data; name="x-obs-object-lock-mode"
COMPLIANCE
----------------------------940435396775653808840608
Content-Disposition: form-data; name="x-obs-object-lock-retain-until-date"
Thu, 20 Jun 2023 13:12:51 GMT
----------------------------940435396775653808840608
Content-Disposition: form-data; name="file"; filename="test.txt"
Content-Type: text/plain
----------------------------940435396775653808840608
Content-Disposition: form-data; name="submit"
Upload to OBS
----------------------------940435396775653808840608--</pre>
</div>
<div class="section" id="obs_04_0081__section1102140135316"><h4 class="sectiontitle">Sample Response: Configuring a WORM Retention Policy When Uploading an Object</h4><pre class="screen" id="obs_04_0081__screen61382040125315">HTTP/1.1 204 No Content
Server: OBS
Date: Thu, 15 Jun 2023 13:24:03 GMT
Connection: keep-alive
Location: http://obs.<em id="obs_04_0081__i9158196173911">region</em>.example.com/srcbucket/obj
ETag: "d41d8cd98f00b204e9800998ecf8427e"
x-obs-request-id: 00000188BF3A36EE5306427D000FEE0A
x-obs-id-2: 32AAAUJAIAABAAAQAAEAABAAAQAAEAABCS/5pj0p0hAQcDVI3B6E5y167zy4eAQv
x-forward-status: 0x40020000000001
x-dae-api-type: REST.POST.OBJECT</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0079.html">Operations on Objects</a></div>
</div>
</div>