doc-exports/docs/obs/s3api/en-us_topic_0125560263.html
zhangyue 6fcdbfd13e OBS S3 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>
2024-02-26 11:17:13 +00:00

529 lines
48 KiB
HTML

<a name="EN-US_TOPIC_0125560263"></a><a name="EN-US_TOPIC_0125560263"></a>
<h1 class="topictitle1">POST Object</h1>
<div id="body31106692"><p id="EN-US_TOPIC_0125560263__p192951444144213">You can use this operation to upload an object to an existing bucket.</p>
<p id="EN-US_TOPIC_0125560263__p28327138">Uploading an object indicates that an object is added to a bucket. This operation requires the write permission.</p>
<div class="note" id="EN-US_TOPIC_0125560263__note53617656"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="text" id="EN-US_TOPIC_0125560263__p11524775">The objects that are uploaded by users are stored in buckets. Only the users who have the write permission can upload objects to buckets. The names of objects in the same bucket must be unique.</p>
</div></div>
<p id="EN-US_TOPIC_0125560263__p1240242614329">If objects whose object keys are the same exist in a specified bucket, the new objects that are uploaded by a user will overwrite the original objects. To prevent data from being damaged during the transfer process, users can add <strong id="EN-US_TOPIC_0125560263__b2402122616329">Content-MD5</strong> to request headers. After OBS receives the objects that are uploaded, it executes MD5 verification and will return an error if inconsistency is detected.</p>
<p id="EN-US_TOPIC_0125560263__p12796860">Users can specify the <strong id="EN-US_TOPIC_0125560263__b3959183512106">x-amz-acl</strong> parameter and set a permission control policy when uploading objects.</p>
<p id="EN-US_TOPIC_0125560263__p48062879">After creating a bucket in OBS, you can send a <strong id="EN-US_TOPIC_0125560263__b18185184251018">PUT Object</strong> request to upload an object to the bucket.</p>
<p id="EN-US_TOPIC_0125560263__p63313385165356">This operation makes server-side encryption available.</p>
<div class="section" id="EN-US_TOPIC_0125560263__section779118"><h4 class="sectiontitle">Versioning</h4><p id="EN-US_TOPIC_0125560263__p47536979">If a bucket has versioning enabled, 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="EN-US_TOPIC_0125560263__b11890164891012">x-amz-version-id</strong>. If a bucket has versioning suspended, the version ID of the requested object in this bucket is <strong id="EN-US_TOPIC_0125560263__b25290077">null</strong>. For details about bucket versioning, see section <a href="en-us_topic_0125560444.html">PUT Bucket versioning</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section1475721115541"><h4 class="sectiontitle">WORM</h4><p id="EN-US_TOPIC_0125560263__p759131755418">If a bucket has WORM enabled, you can configure retention policies for objects in the bucket. You can specify the <strong id="EN-US_TOPIC_0125560263__b2129195454814">x-amz-object-lock-mode</strong> and <strong id="EN-US_TOPIC_0125560263__b171291954144819">x-amz-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, see section <a href="en-us_topic_0000001806154009.html">Configuring WORM Retention for an Object</a>.</p>
<div class="note" id="EN-US_TOPIC_0125560263__note7133240105611"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0125560263__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="EN-US_TOPIC_0125560263__b15581831722">test.txt 001</strong> is protected by WORM. If another file with the same name is uploaded, a new object version <strong id="EN-US_TOPIC_0125560263__b281671813420">test.txt 002</strong> with no WORM policy configured will be generated. In such case, <strong id="EN-US_TOPIC_0125560263__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="EN-US_TOPIC_0125560263__b15327114162416">test.txt 002</strong>) will be downloaded.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section17540457"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen65199168111733">POST / HTTP/1.1
Host: bucketname.obs.example.com
User-Agent: browser_data
Accept: file_types
Accept-Language: Regions
Accept-Encoding: encoding
Accept-Charset: character_set
Keep-Alive: 300
Connection: keep-alive
Content-Type: multipart/form-data; boundary=-9431149156168
Content-Length: length
--9431149156168
Content-Disposition: form-data; name="key"
acl
--9431149156168
Content-Disposition: form-data; name="success_action_redirect"
success_redirect
--9431149156168
Content-Disposition: form-data; name="content-Type"
content_type
--9431149156168
Content-Disposition: form-data; name="x-amz-meta-uuid"
uuid
--9431149156168
Content-Disposition: form-data; name="x-amz-meta-tag"
metadata
--9431149156168
Content-Disposition: form-data; name="AWSAccessKeyId"
access-key-id
--9431149156168
Content-Disposition: form-data; name="policy"
encoded_policy
--9431149156168
Content-Disposition: form-data; name="signature"
signature=
--9431149156168
Content-Disposition: form-data; name="file"; filename="MyFilename"
Content-Type: image/jpeg
file_content
--9431149156168
Content-Disposition: form-data; name="submit"
Upload to OBS
--9431149156168--</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section23646388"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0125560263__p13621136">This request involves no parameters.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section11490904"><h4 class="sectiontitle">Request Headers</h4><p id="EN-US_TOPIC_0125560263__p29570261">This request uses common headers. For details about common request headers, see section <a href="en-us_topic_0125560462.html">Common Request Headers</a>. If you want to obtain CORS configuration information, you must use the headers in <a href="#EN-US_TOPIC_0125560263__table48637933">Table 1</a>.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560263__table48637933"></a><a name="table48637933"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560263__table48637933" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request headers of CORS configuration</caption><thead align="left"><tr id="EN-US_TOPIC_0125560263__row22385437"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.12.3.2.4.1.1"><p id="EN-US_TOPIC_0125560263__p1281126">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.12.3.2.4.1.2"><p id="EN-US_TOPIC_0125560263__p36662351">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.12.3.2.4.1.3"><p id="EN-US_TOPIC_0125560263__p16860416">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560263__row23516450"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p25784284">Origin</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p8152279">Indicates an origin specified by a pre-request. Generally, it is a domain name.</p>
<p id="EN-US_TOPIC_0125560263__p6261652">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p37431827">Mandatory</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row1342126"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p41603419">Access-Control-Request-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p14433768">Indicates the HTTP headers of a request. The request can use multiple HTTP headers.</p>
<p id="EN-US_TOPIC_0125560263__p62795050">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p53234283">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row133743171618"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p10584027164">x-amz-security-token</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p13589112161616">Header field used to identify the request of a federated user. When the federal authentication function is enabled, users sending such requests are identified as federated users.</p>
<p id="EN-US_TOPIC_0125560263__p459017221614">Type: string</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.12.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p15921241616">Optional. This parameter must be carried in the request sent by federated users.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="EN-US_TOPIC_0125560263__p9346499"></p>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section2355172710170"><h4 class="sectiontitle">Request Elements</h4><p id="EN-US_TOPIC_0125560263__p18868961">This request uses form fields. <a href="#EN-US_TOPIC_0125560263__table13225554">Table 2</a> describes the form fields.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560263__table13225554"></a><a name="table13225554"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560263__table13225554" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Form fields</caption><thead align="left"><tr id="EN-US_TOPIC_0125560263__row35727861"><th align="left" class="cellrowborder" valign="top" width="26.062606260626065%" id="mcps1.3.13.3.2.4.1.1"><p id="EN-US_TOPIC_0125560263__p8275629">Form Field</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.83508350835084%" id="mcps1.3.13.3.2.4.1.2"><p id="EN-US_TOPIC_0125560263__p66346226">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.102310231023104%" id="mcps1.3.13.3.2.4.1.3"><p id="EN-US_TOPIC_0125560263__p5335211">Remarks</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560263__row29498945"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p40604315">file</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p615201">Indicates the content of the object to be uploaded.</p>
<p id="EN-US_TOPIC_0125560263__p5536817">Type: Binary or text content</p>
<p id="EN-US_TOPIC_0125560263__p49831357">Constraints: This field must be the last one in a form. Each request can contain only one <strong id="EN-US_TOPIC_0125560263__b45829029">file</strong> field. All excessive <strong id="EN-US_TOPIC_0125560263__b9808084">file</strong> fields are discarded.</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p56257360">Mandatory</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row36554200"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p8100198">key</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p52136268">Indicates the name of the object to be uploaded.</p>
<p id="EN-US_TOPIC_0125560263__p66573232">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p23722702">Mandatory</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row12177730"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p46872098">AWSAccessKeyId</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p38543611">Indicates the AK of the requester.</p>
<p id="EN-US_TOPIC_0125560263__p11348180">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p35024756">Constraints: Required if the <strong id="EN-US_TOPIC_0125560263__b46787348">policy</strong> field is included in the request.</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p31678816">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row16673895"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p8408241">policy</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p9978940">Indicates the security policy of the request.</p>
<p id="EN-US_TOPIC_0125560263__p22701601">Type: String</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p26890416">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row40687155"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p7325296">expires</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p56478093">Indicates the date and time at which an object is no longer cacheable. The time is expressed in milliseconds in RFC 2616 format. If this field is specified, it will be returned in response headers after you send a <strong id="EN-US_TOPIC_0125560263__b78715716106">GET Object</strong> or <strong id="EN-US_TOPIC_0125560263__b11322802">HEAD Object</strong> request.</p>
<p id="EN-US_TOPIC_0125560263__p34796360">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p44731784">Example:</p>
<p id="EN-US_TOPIC_0125560263__p67041741">Policy: {" expires ": "1000" }</p>
<p id="EN-US_TOPIC_0125560263__p66504758">HTML: &lt;input type="text" name=" expires " value="1000" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p18176357">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row29369493"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p30118695">x-amz-acl</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p23695246">Indicates the ACL applied to the object to be uploaded. Possible values are <strong id="EN-US_TOPIC_0125560263__b11930629">private</strong>, <strong id="EN-US_TOPIC_0125560263__b40266802">public-read</strong>, <strong id="EN-US_TOPIC_0125560263__b26856902">public-read-write</strong>, <strong id="EN-US_TOPIC_0125560263__b40385530">authenticated-read</strong>, <strong id="EN-US_TOPIC_0125560263__b27925455">bucket-owner-read</strong>, and <strong id="EN-US_TOPIC_0125560263__b50002511">bucket-owner-full-control</strong>. For details, see <a href="en-us_topic_0125560406.html#EN-US_TOPIC_0125560406__table40200743">Table 4</a>.</p>
<p id="EN-US_TOPIC_0125560263__p23671576">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p11717596">Example:</p>
<p id="EN-US_TOPIC_0125560263__p38349502">Policy: {"acl": "public-read" }</p>
<p id="EN-US_TOPIC_0125560263__p9601199">HTML:&lt;input type="text" name="acl" value="public-read" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p39499626">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row18755193052610"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p1075125011447">x-amz-storage-class</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p7305518157">When creating an object, you can add this header in the request to set the storage class of the object. If you do not add this header, the object will use the default storage class of the bucket.</p>
<p id="EN-US_TOPIC_0125560263__p183055181656">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p83054181511">Note: The storage class can be <strong id="EN-US_TOPIC_0125560263__b4305121814519">STANDARD</strong> (OBS Standard), <strong id="EN-US_TOPIC_0125560263__b1830516181052">STANDARD_IA</strong> (OBS Warm), or <strong id="EN-US_TOPIC_0125560263__b43051018859">GLACIER</strong> (OBS Cold). Note that the three storage class values are case-sensitive.</p>
<p id="EN-US_TOPIC_0125560263__p63051018859">Example: x-amz-storage-class: STANDARD</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p1157872174110">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row19952318"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p5525098">Cache-Control, Content-Type, Content-Disposition, Content-Encoding</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p44879761">Indicate standard HTTP headers. If these fields are specified, they are returned in response headers after you send a <strong id="EN-US_TOPIC_0125560263__b1264671">GET Object</strong> or <strong id="EN-US_TOPIC_0125560263__b11382045">HEAD Object</strong> request.</p>
<p id="EN-US_TOPIC_0125560263__p35329549">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p49530486">Example:</p>
<p id="EN-US_TOPIC_0125560263__p43121195">Policy: ["starts-with", "$Content-Type", "text/"]</p>
<p id="EN-US_TOPIC_0125560263__p52546435">HTML: &lt;input type="text" name="content-type" value="text/plain" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p28402861">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row54299160"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p36155831">success_action_redirect</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p42941223">Indicates the URL to which the client is redirected after the request is successfully responded to.</p>
<ul id="EN-US_TOPIC_0125560263__ul50926693"><li id="EN-US_TOPIC_0125560263__li55687056">If the value is valid and the request is successful, OBS returns status code 303. <strong id="EN-US_TOPIC_0125560263__b31421457">Location</strong> contains success_action_redirect, bucket name, object name, and object ETag.</li><li id="EN-US_TOPIC_0125560263__li14357657">If the value is invalid, OBS ignores this field and returns status code 204. <strong id="EN-US_TOPIC_0125560263__b62110049">Location</strong> contains the object address.</li></ul>
<p id="EN-US_TOPIC_0125560263__p22119530">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p64858045">Example:</p>
<p id="EN-US_TOPIC_0125560263__p46851500">Policy: {"success_action_redirect": "http://123458.com"}</p>
<p id="EN-US_TOPIC_0125560263__p19010318">HTML: &lt;input type="text" name="success_action_redirect" value="http://123458.com" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p63440828">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row34096545"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p10356773">x-amz-meta-*</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p33592248">This prefix is used to construct a field in a <strong id="EN-US_TOPIC_0125560263__b33894784">POST</strong> request for returning self-defined metadata. If this prefix is specified, user-defined metadata is returned in one or more response headers prefixed with <strong id="EN-US_TOPIC_0125560263__b36617605">x-amz-meta-</strong>.</p>
<p id="EN-US_TOPIC_0125560263__p7423105101115">Note: The format of the user-defined metadata header is x-amz-meta-key:value. The total size of the key and value of all user-defined metadata in the request cannot exceed 2 KB.</p>
<p id="EN-US_TOPIC_0125560263__p61122992">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p13236018">Example:</p>
<p id="EN-US_TOPIC_0125560263__p52015300">Policy: {" x-amz-meta-test ": " test metadata " }</p>
<p id="EN-US_TOPIC_0125560263__p65484519">HTML: &lt;input type="text" name=" x-amz-meta-test " value=" test metadata " /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p2645837">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row23812538"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p49767403">success_action_status</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p4627874">Indicates the status code returned after a <strong id="EN-US_TOPIC_0125560263__b1489418516114">POST Object</strong> request is successfully received. Possible values are <strong id="EN-US_TOPIC_0125560263__b39313476">200</strong>, <strong id="EN-US_TOPIC_0125560263__b18276970">201</strong>, and <strong id="EN-US_TOPIC_0125560263__b30275003">204</strong>.</p>
<ul id="EN-US_TOPIC_0125560263__ul4039578"><li id="EN-US_TOPIC_0125560263__li36356207">If the value is set to <strong id="EN-US_TOPIC_0125560263__b58770411">200</strong> or <strong id="EN-US_TOPIC_0125560263__b59171655">204</strong>, OBS returns an empty response body.</li><li id="EN-US_TOPIC_0125560263__li62782852">If the value is set to <strong id="EN-US_TOPIC_0125560263__b28174764">201</strong>, OBS returns a response containing an XML file recording request details.</li><li id="EN-US_TOPIC_0125560263__li52246286">If the value is not set or is invalid, OBS returns status code 204.</li></ul>
<p id="EN-US_TOPIC_0125560263__p454533">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p4090801">Example:</p>
<p id="EN-US_TOPIC_0125560263__p36817211">Policy: ["starts-with", "$success_action_status", ""]</p>
<p id="EN-US_TOPIC_0125560263__p62919444">HTML: &lt;input type="text" name="success_action_status" value="200" /&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p63310175">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row32920667"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p49328407">x-amz-website-redirect-location</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p36177998">If a bucket is configured as a website, redirects 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="EN-US_TOPIC_0125560263__p57166532">Default: None</p>
<p id="EN-US_TOPIC_0125560263__p44736746">Constraint: The value must be prefixed by a slash (/), <strong id="EN-US_TOPIC_0125560263__b67086402">http://</strong>, or <strong id="EN-US_TOPIC_0125560263__b089551381110">https://</strong>. The length of the value cannot exceed 2 K.</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p50734192">Optional</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row53360395102221"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p14442198165530">x-amz-server-side-encryption</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p28967360165530">Indicates that SSE-KMS is used.</p>
<p id="EN-US_TOPIC_0125560263__p59379650165530">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p64654806165530">Example: x-amz-server-side-encryption:aws:kms</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p style="color:#FF0001;" id="EN-US_TOPIC_0125560263__p1093962910237">No. This header is mandatory when KMS-managed keys are used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row62019588102226"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p22931730165530">x-amz-server-side-encryption-aws-kms-key-id</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p45530871165530">Indicates the master key ID. This header is used in SSE-KMS mode. If the customer does not provide the master key, the default master key will be used.</p>
<p id="EN-US_TOPIC_0125560263__p7124661165530">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p124692385453">Example: x-amz-server-side-encryption-aws-kms-key-id:arn:aws:kms:sichuan:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p style="color:#FF0001;" id="EN-US_TOPIC_0125560263__p944193310237">No</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row31579001102234"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p40004351165530">x-amz-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p19127016165530">Indicates an encryption algorithm. The header is used in SSE-C mode.</p>
<p id="EN-US_TOPIC_0125560263__p37925417165530">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p5784433165530">Example: x-amz-server-side-encryption-customer-algorithm:AES256</p>
<p id="EN-US_TOPIC_0125560263__p52059897165530">Constraints: This header must be used together with <strong id="EN-US_TOPIC_0125560263__b65885890165530">x-amz-server-side-encryption-customer-key</strong> and <strong id="EN-US_TOPIC_0125560263__b56102101165530">x-amz-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p style="color:#FF0001;" id="EN-US_TOPIC_0125560263__p5213447810237">No. This header is mandatory when customer-provided keys are used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row12930993102238"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p29134046165530">x-amz-server-side-encryption-customer-key</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p11047545165530">Indicates a key used to encrypt objects. The header is used in SSE-C mode.</p>
<p id="EN-US_TOPIC_0125560263__p32319046165530">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p22435965165530">Example: x-amz-server-side-encryption-customer-key:K7QkYpBkM5+hcs27fsNkUnNVaobncnLht/rCB2o/9Cw=</p>
<p id="EN-US_TOPIC_0125560263__p597093165530">Constraints: This header is a base64-encoded 256-bit or 512-bit key and must be used together with <strong id="EN-US_TOPIC_0125560263__b5373840165530">x-amz-server-side-encryption-customer-algorithm</strong> and <strong id="EN-US_TOPIC_0125560263__b48364568165530">x-amz-server-side-encryption-customer-key-MD5</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p style="color:#FF0001;" id="EN-US_TOPIC_0125560263__p4579914410237">No. This header is mandatory when customer-provided keys are used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row61346682102242"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p25616906165530">x-amz-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p61703487165530">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="EN-US_TOPIC_0125560263__p18460477165530">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p31926565165530">Example: x-amz-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</p>
<p id="EN-US_TOPIC_0125560263__p18903634165530">Constraints: This header is a base64-encoded 128-bit MD5 value and must be used together with <strong id="EN-US_TOPIC_0125560263__b35914979165530">x-amz-server-side-encryption-customer-algorithm</strong> and <strong id="EN-US_TOPIC_0125560263__b54799363165530">x-amz-server-side-encryption-customer-key</strong>.</p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p style="color:#FF0001;" id="EN-US_TOPIC_0125560263__p5512158810237">No. This header is mandatory when customer-provided keys are used.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row199284557418"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p5180191819182"><span style="color:#494949;">x-amz-object-lock-mode</span></p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__p6180918151813">WORM mode that will be applied to the object. Currently, only <strong id="EN-US_TOPIC_0125560263__b1513901610123">COMPLIANCE</strong> is supported. This header must be used together with <strong id="EN-US_TOPIC_0125560263__b6139161618121">x-amz-object-lock-retain-until-date</strong>.</p>
<p id="EN-US_TOPIC_0125560263__p14496145181918">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p154228537191">Example: <strong id="EN-US_TOPIC_0125560263__b1443645174916">x-amz-object-lock-mode:COMPLIANCE</strong></p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p2180181810184">No, but required when <strong id="EN-US_TOPIC_0125560263__b8517161919916">x-amz-object-lock-retain-until-date</strong> is present.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row27294589419"><td class="cellrowborder" valign="top" width="26.062606260626065%" headers="mcps1.3.13.3.2.4.1.1 "><p id="EN-US_TOPIC_0125560263__p14809920131812"><span style="color:#494949;">x-amz-object-lock-retain-until-date</span></p>
</td>
<td class="cellrowborder" valign="top" width="50.83508350835084%" headers="mcps1.3.13.3.2.4.1.2 "><p id="EN-US_TOPIC_0125560263__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="EN-US_TOPIC_0125560263__b1071012402281">2015-07-01T04:11:15Z</strong>. This header must be used together with <strong id="EN-US_TOPIC_0125560263__b107108402286">x-amz-object-lock-mode</strong>.</p>
<p id="EN-US_TOPIC_0125560263__p1972081822113">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p372031872119">Example: <strong id="EN-US_TOPIC_0125560263__b1953135414913">x-amz-object-lock-retain-until-date:2015-07-01T04:11:15Z</strong></p>
</td>
<td class="cellrowborder" valign="top" width="23.102310231023104%" headers="mcps1.3.13.3.2.4.1.3 "><p id="EN-US_TOPIC_0125560263__p080992031813">No, but required when <strong id="EN-US_TOPIC_0125560263__b13754185712495">x-amz-object-lock-mode</strong> is present.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section4600155"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen28642520112041">HTTP/1.1 status_code
Server: Server Name
x-amz-request-id: request id
x-amz-id-2: id
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: type
Location: location
Date: date
ETag: etag</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section41401397"><h4 class="sectiontitle">Response Headers</h4><p id="EN-US_TOPIC_0125560263__p16883911">This response uses common headers. For details about common response headers, see section <a href="en-us_topic_0125560484.html">Common Response Headers</a>. This response also uses one optional header, as described in <a href="#EN-US_TOPIC_0125560263__table15828906">Table 3</a>.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0125560263__table15828906"></a><a name="table15828906"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0125560263__table15828906" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Optional response header</caption><thead align="left"><tr id="EN-US_TOPIC_0125560263__row56780500"><th align="left" class="cellrowborder" valign="top" width="43.76%" id="mcps1.3.15.3.2.3.1.1"><p id="EN-US_TOPIC_0125560263__p35817813">Header</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.24%" id="mcps1.3.15.3.2.3.1.2"><p id="EN-US_TOPIC_0125560263__p15561779">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0125560263__row52544597"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p28253988">x-amz-version-id</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p6871687">Indicates the version ID of an object. The version ID of an object will be returned if the bucket housing the object has versioning enabled. A string "<strong id="EN-US_TOPIC_0125560263__b61845188">null</strong>" will be returned if the bucket housing the object has versioning suspended.</p>
<p id="EN-US_TOPIC_0125560263__p19735783">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row27094327163230"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p4888192163315">Access-Control-Allow-Origin</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p60399258163315">CORS is configured for buckets. If <strong id="EN-US_TOPIC_0125560263__b6722416163315">Origin</strong> in the request meets the CORS configuration requirements, <strong id="EN-US_TOPIC_0125560263__b60501749163315">Origin</strong> is included in the response.</p>
<p id="EN-US_TOPIC_0125560263__p7644834163315">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row21192939163237"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p3048844163315">Access-Control-Allow-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p45629849163315">CORS is configured for buckets. If <strong id="EN-US_TOPIC_0125560263__b8015460163315">headers</strong> in the request meet the CORS configuration requirements, <strong id="EN-US_TOPIC_0125560263__b5030278163315">headers</strong> are included in the response.</p>
<p id="EN-US_TOPIC_0125560263__p45272504163315">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row1816317163243"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p53203489163315">Access-Control-Max-Age</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p14515359163315">Indicates <strong id="EN-US_TOPIC_0125560263__b63529375163315">MaxAgeSeconds</strong> in the CORS configuration of a server when CORS is configured for buckets.</p>
<p id="EN-US_TOPIC_0125560263__p34893470163315">Type: Integer</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row5613687716333"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p3080824163315">Access-Control-Allow-Methods</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p48220207163315">CORS is configured for buckets. If <strong id="EN-US_TOPIC_0125560263__b31328686163315">Access-Control-Request-Method</strong> in the request meets the CORS configuration requirements, methods in the rule are included in the response.</p>
<p id="EN-US_TOPIC_0125560263__p13522723163315">Type: String</p>
<p id="EN-US_TOPIC_0125560263__p54595647163315">Valid values: <strong id="EN-US_TOPIC_0125560263__b21598779163315">GET</strong>, <strong id="EN-US_TOPIC_0125560263__b60171288163315">PUT</strong>, <strong id="EN-US_TOPIC_0125560263__b4670688163315">HEAD</strong>, <strong id="EN-US_TOPIC_0125560263__b42036194163315">POST</strong>, and <strong id="EN-US_TOPIC_0125560263__b42781433163315">DELETE</strong></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row42062386163310"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p49152104163315">Access-Control-Expose-Headers</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p21897459163315">Indicates <strong id="EN-US_TOPIC_0125560263__b132551625101114">ExposeHeader</strong> in the CORS configuration of a server when CORS is configured for buckets.</p>
<p id="EN-US_TOPIC_0125560263__p28863759163315">Type: String</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row53465640102323"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p8517062165713">x-amz-server-side-encryption</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p18793394165713">This header is included in a response if SSE-KMS is used.</p>
<p id="EN-US_TOPIC_0125560263__p34922825165713">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p45869971165713">Example: x-amz-server-side-encryption:aws:kms</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row50047651102330"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p18995294165713">x-amz-server-side-encryption-aws-kms-key-id</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p62223858165713">Indicates the master key ID. This header is included in a response if SSE-KMS is used.</p>
<p id="EN-US_TOPIC_0125560263__p2119104834619">Example: x-amz-server-side-encryption-aws-kms-key-id:arn:aws:kms:sichuan:domainiddomainiddomainiddoma0001:key/4f1cd4de-ab64-4807-920a-47fc42e7f0d0</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row11281438102334"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p27512946165713">x-amz-server-side-encryption-customer-algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p13956143165713">Indicates an encryption algorithm. This header is included in a response if SSE-C is used.</p>
<p id="EN-US_TOPIC_0125560263__p58496425165713">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p56705780165713">Example: x-amz-server-side-encryption-customer-algorithm:AES256</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0125560263__row42371356102326"><td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.15.3.2.3.1.1 "><p id="EN-US_TOPIC_0125560263__p66562751165713">x-amz-server-side-encryption-customer-key-MD5</p>
</td>
<td class="cellrowborder" valign="top" width="56.24%" headers="mcps1.3.15.3.2.3.1.2 "><p id="EN-US_TOPIC_0125560263__p22873728165713">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="EN-US_TOPIC_0125560263__p4536967165713">Type: string</p>
<p id="EN-US_TOPIC_0125560263__p40832711165713">Example: x-amz-server-side-encryption-customer-key-MD5:4XvB3tbNTN+tIEVa0/fGaQ==</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section37068254"><h4 class="sectiontitle">Response Elements</h4><p id="EN-US_TOPIC_0125560263__p55094571">This response involves no elements.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section65178831"><h4 class="sectiontitle">Error Responses</h4><p id="EN-US_TOPIC_0125560263__p33475260">No special error responses are returned. For details about error responses, see <a href="en-us_topic_0125560440.html#EN-US_TOPIC_0125560440__table30733758">Table 1</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section4443775"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen22417596112113">POST / HTTP/1.1
Date: Fri, 18 Nov 2011 01:19:49 GMT
Host: bucketname.obs.example.com
Content-Type: multipart/form-data; boundary=---------------------------7db143f50da2
Content-Length: 2424
-----------------------------7db143f50da2
Content-Disposition: form-data; name="key"
object01
-----------------------------7db143f50da2
Content-Disposition: form-data; name="acl"
public-read
-----------------------------7db143f50da2
Content-Disposition: form-data; name="content-type"
text/plain
-----------------------------7db143f50da2
Content-Disposition: form-data; name="expires"
1000
-----------------------------7db143f50da2
Content-Disposition: form-data; name="AWSAccessKeyId"
14RZT432N80TGDF2Y2G2
-----------------------------7db143f50da2
Content-Disposition: form-data; name="policy"
ewogICJleHBpcmF0aW9uIjogIjIwMTItMDEtMDFUMTI6MDA6MDAuMDAwWiIsCiAgImNvbmRpdGlvbnMiOiBbCiAgICB7ImJ1Y2tldCI6ICJ0Yy5wb3N0LmV4cGlyZXMuMDAxIiB9LAogICAgeyJhY2wiOiAicHVibGljLXJlYWQiIH0sCiAgICB7IkV4cGlyZXMiOiAiMTAwMCIgfSwKICAgIFsiZXEiLCAiJGtleSIsICJvYmplY3QwMSJdLAogICAgWyJzdGFydHMtd2l0aCIsICIkQ29udGVudC1UeXBlIiwgInRleHQvIl0sCiAgXQp9Cg==
-----------------------------7db143f50da2
Content-Disposition: form-data; name="signature"
Vk6rwO0Nq09BLhvNSIYwSJTRQ+k=
-----------------------------7db143f50da2
Content-Disposition: form-data; name="file"; filename="C:\Testtools\UpLoadFiles\object\1024Bytes.txt"
Content-Type: text/plain
01234567890
-----------------------------7db143f50da2
Content-Disposition: form-data; name="submit"
Upload
-----------------------------7db143f50da2--</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section39993975"><h4 class="sectiontitle">Sample Response for Uploading Objects to a Bucket with No Versioning Configured</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen20437644112129">HTTP/1.1 204 No Content
Server: OBS
x-amz-request-id: 90E2BA00C26C00000133B442A90063FD
x-amz-id-2: OTBFMkJBMDBDMjZDMDAwMDAxMzNCNDQyQTkwMDYzRkRBQUFBQUFBQWJiYmJiYmJi
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: text/xml
Location: http://obs.example.com/tc.post.expires.001/object01
Date: Fri, 18 Nov 2011 01:20:27 GMT
ETag: "ab7abb0da4bca5323ab6119bb5dcd296"</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section24401462"><h4 class="sectiontitle">Sample Response for Uploading Objects to a Bucket with Versioning Enabled</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen7153828112143">HTTP/1.1 204 No Content
Server: OBS
x-amz-request-id: DCD2FC9CAB780000014394C8D18D7A7F
x-amz-id-2: ebDwZjh64WVojaUVqPaWaXPqqfqLcp15DNr1KkAkP9EXyWrLsrqQoUs1Xn49VC9h
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: text/xml
Location: http://192.168.69.11/example/testfile.txt
ETag: "098f6bcd4621d373cade4e832627b4f6"
x-amz-version-id: AAABQ5TI0anc0vycq3gAAAAyVURTRkha
Date: Wed, 15 Jan 2014 07:23:45 GMT</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section18286572"><h4 class="sectiontitle">Sample Response for Uploading Objects to a Bucket with Versioning Suspended</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen1676018311225">HTTP/1.1 204 No Content
Server: OBS
x-amz-request-id: DCD2FC9CAB780000014394F041CA8F94
x-amz-id-2: 8EUVTpv5QBvTslQVlaDrzEauRpDP9fusd4IiJrgjExdPlyz+xleFMCNZD/zK0aZg
x-reserved: amazon, aws and amazon web services are trademarks or registered trademarks of Amazon Technologies, Inc
Content-Type: text/xml
Location: http://192.168.69.11/example/testfile.txt
ETag: "cc03e747a6afbbcbf8be7668acfebee5"
x-amz-version-id: null
Date: Wed, 15 Jan 2014 08:06:50 GMT</pre>
</div>
<div class="section" id="EN-US_TOPIC_0125560263__section1299154075311"><h4 class="sectiontitle">Sample Request for Configuring a WORM Retention Policy When Uploading an Object</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen16138124035319">POST /srcbucket HTTP/1.1
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Postman-Token: 4c2f4c7e-2e0b-46c0-b1a7-4a5da560b6a1
Host: obs.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-amz-object-lock-mode"
COMPLIANCE
----------------------------940435396775653808840608
Content-Disposition: form-data; name="x-amz-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="EN-US_TOPIC_0125560263__section1102140135316"><h4 class="sectiontitle">Sample Response for Configuring a WORM Retention Policy When Uploading an Object</h4><pre class="screen" id="EN-US_TOPIC_0125560263__screen61382040125315">HTTP/1.1 204 No Content
Server: OBS
Date: Thu, 15 Jun 2023 13:24:03 GMT
Connection: keep-alive
Location: http://obs.example.com/srcbucket/obj
ETag: "d41d8cd98f00b204e9800998ecf8427e"
x-amz-request-id: 00000188BF3A36EE5306427D000FEE0A
x-amz-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="en-us_topic_0125560489.html">Operations on Objects</a></div>
</div>
</div>