PutObject
- Print
- PDF
PutObject
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Upload an object and create metadata.
If you upload an already saved object again, it will be overwritten, and if you recreate existing metadata, it will be updated with the newly entered values.
Requests
The following describes the request format for the endpoint. The request format is as follows.
Method | URI |
---|---|
PUT | /v1/AUTH_{project_id}/{container}/{object} |
Request headers
The following describes the headers.
Field | Type | Required | Description |
---|---|---|---|
X-Auth-Token | String | Optional | Value of the issued token |
X-Object-Meta-{name} | String | Optional | Metadata to set
|
X-Object-Manifest | String | Conditional | When uploading large objects, the manifest of the object (SLO)
|
X-Delete-At | Integer | Optional | Scheduled time for automatic deletion of the object (Unix timestamp)
|
X-Delete-After | Integer | Optional | When to delete the object automatically (enter in seconds)
|
X-Detect-Content-Type | Boolean | Optional | Automatically set the MIME type of the object based on the file extension
|
X-Copy-From | String | Optional | Copy the object
|
X-Copy-From-Account | String | Optional | Copy the object to another account |
Content-Disposition | String | Optional | Browser's response handling method |
Content-Encoding | String | Optional | Object's encoding method |
Content-Type | String | Optional | Object's MIME type |
Content-Length | Integer | Optional | Object capacity
|
Transfer-Encoding | String | Optional | Set up chunked transfer encoding
|
ETag | String | Optional | ETag header value |
If-None-Match | String | Optional | ETag condition header
|
Request path parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
project_id | String | Required | Project ID
|
container | String | Required | Name of the container where the target object will be stored |
object | String | Required | Name of the object to save |
Request query parameters
The following describes the parameters.
Field | Type | Required | Description |
---|---|---|---|
temp_url_sig | String | Optioanl | Signature of a temporary URL to access the resource to be stored
|
temp_url_expires | Integer | Optioanl | Expiration time for the temporary URL to access the resource to be stored (Unix timestamp) |
multipart-manifest | String | Conditional | Declare a multipart upload of a large object
|
Request example
The following is a sample request.
curl -L -X PUT 'https://kr.archive.ncloudstorage.com/v1/AUTH_{project_id}/{container}/{object}' \
-H 'X-Auth-Token: {token}' \
-H 'X-Object-Meta-collection: C1' \
-H 'X-Detect-Content-Type: true' \
-T '@{/FILE_PATH/OBJECT}'
Responses
The following describes the response format.
Response headers
The following describes the headers.
Field | Type | Required | Description |
---|---|---|---|
Content-Type | String | - | MIME type of the response result |
Content-Length | String | - | Length of the response result (bytes) |
ETag | String | - | ETag header value |
Last-Modified | String | - | Most recent modification time of the object (UTC) |
X-Trans-Id | String | - | Transaction ID of the request |
X-Openstack-Request-Id | String | - | Transaction ID of the request
|
Date | String | - | Response time of the request (UTC) |
Response status codes
The following describes the response status codes.
HTTP status code | Code | Message | Description |
---|---|---|---|
201 | - | Created | Request succeeded |
408 | - | Request Timeout | Request timeout |
Response example
The following is a sample response.
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
Was this article helpful?