PutObject
    • PDF

    PutObject

    • PDF

    Article Summary

    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

    NameInTypeDescription
    project_idpathstringProject ID
    containerpathstringContainer (bucket) name
    objectpathstringObject name
    multipart-manifest (Optional)querystringIf multipart-manifest=put, the object is considered a large object (SLO) manifest. The request body must contain the manifest.
    temp_url_sigquerystringTemporary URL
    temp_url_expiresqueryintegerTemporary URL
    X-Object-Manifest (Optional)headerstringLarge object (DLO) manifest in the form of {container}/{prefix}.
    X-Auth-Token (Optional)headerstringToken
    Content-Length (Optional)headerintegerLength of the object. You don’t need to specify this header if Transfer-Encoding is chunked transfer encoding.
    Transfer-Encoding (Optional)headerstringSet 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)headerstringMIME type of the object
    X-Detect-Content-Type (Optional)headerbooleanIf it is true, Content-Type is determined based on the file extension. This header has priority over Content-Type.
    X-Copy-From (Optional)headerstringCopies an object. The value of this header is {container}/{object}. It can be combined with the Range header.
    X-Copy-From-Account (Optional)headerstringCopies an object to another account.
    ETag (Optional)headerstringETag header value
    Content-Disposition (Optional)headerstringRedefines browser behaviors.
    Content-Encoding (Optional)headerstringEncoding type of the object
    X-Delete-At (Optional)headerintegerThe time at which to delete the object [Folder objects cannot be deleted] (in Unix Epoch timestamp)
    X-Delete-After (Optional)headerintegerThe time after which to delete the object [Folder objects cannot be deleted] (in seconds)
    X-Object-Meta-name (Optional)headerstringMetadata 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)headerstringETag conditional header. For more information, refer to RFC2616

    Response

    NameInTypeDescription
    Content-LengthheaderstringLength of the response result. (in bytes)
    ETagheaderstringETag header value
    X-Trans-IdheaderstringTransaction ID of the request
    X-Openstack-Request-IdheaderstringTransaction ID of the request (same as X-Trans-Id)
    DateheaderstringResponse time of the request (in UTC)
    Content-TypeheaderstringMIME type of the response result
    last-modifiedheaderstringThe 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?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.