PutObject
- Print
- PDF
PutObject
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Overview
Uploads an object and creates metadata.
It overwrites the existing object and updates the existing metadata.
Syntax
PUT /v1/AUTH_{project_id}/{container}/{object}
Request
Name | In | Type | Description |
---|---|---|---|
project_id | path | string | Project ID |
container | path | string | Container (bucket) name |
object | path | string | Object name |
multipart-manifest (Optional) | query | string | If multipart-manifest=put, the object is considered a large object (SLO) manifest. The request body must contain the manifest. |
temp_url_sig | query | string | Temporary URL |
temp_url_expires | query | integer | Temporary URL |
X-Object-Manifest (Optional) | header | string | Large object (DLO) manifest in the form of {container}/{prefix}. |
X-Auth-Token (Optional) | header | string | Token |
Content-Length (Optional) | header | integer | Length of the object. You don’t need to specify this header if Transfer-Encoding is chunked transfer encoding. |
Transfer-Encoding (Optional) | header | string | Set this header to chunked transfer encoding. If it is set, do not set the Content-Length header to a value other than 0. |
Content-Type (Optional) | header | string | MIME type of the object |
X-Detect-Content-Type (Optional) | header | boolean | If it is true, Content-Type is determined based on the file extension. This header has priority over Content-Type. |
X-Copy-From (Optional) | header | string | Copies an object. The value of this header is {container}/{object}. It can be combined with the Range header. |
X-Copy-From-Account (Optional) | header | string | Copies an object to another account. |
ETag (Optional) | header | string | ETag header value |
Content-Disposition (Optional) | header | string | Redefines browser behaviors. |
Content-Encoding (Optional) | header | string | Encoding type of the object |
X-Delete-At (Optional) | header | integer | The time at which to delete the object [Folder objects cannot be deleted] (in Unix Epoch timestamp) |
X-Delete-After (Optional) | header | integer | The time after which to delete the object [Folder objects cannot be deleted] (in seconds) |
X-Object-Meta-name (Optional) | header | string | Metadata of the object. The name part in the header name functions as a key of the metadata. You can add, update and delete metadata; leave this header empty to delete metadata. |
If-None-Match (Optional) | header | string | ETag conditional header. For more information, refer to RFC2616 |
Response
Name | In | Type | Description |
---|---|---|---|
Content-Length | header | string | Length of the response result. (in bytes) |
ETag | header | string | ETag header value |
X-Trans-Id | header | string | Transaction ID of the request |
X-Openstack-Request-Id | header | string | Transaction ID of the request (same as X-Trans-Id) |
Date | header | string | Response time of the request (in UTC) |
Content-Type | header | string | MIME type of the response result |
last-modified | header | string | The latest time when the object was updated (in UTC) |
Examples
Request example
curl -i -X PUT -H "X-Auth-Token: $token" -T "/FILE_PATH/OBJECT" https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}
Response example
HTTP/1.1 201 Created
Last-Modified: Mon, 17 Sep 2018 07:36:47 GMT
Content-Length: 0
Etag: 95444a08aec383972a52eaaac43e6dce
Content-Type: text/html; charset=UTF-8
X-Trans-Id: txe5ad93db05334b1cb44d2-005b9f598e
X-Openstack-Request-Id: txe5ad93db05334b1cb44d2-005b9f598e
Date: Mon, 17 Sep 2018 07:36:46 GMT
It returns Created (201) status code if successful, and Request Timeout (408) status code if timed out.
Was this article helpful?