tencent cloud

Feedback

Uploading Files

Last updated: 2020-03-12 16:46:02

    API Description

    Feature Description

    1. Upload media (and cover) files.
    2. For how to upload from a client using an API, please see Overview of Upload from Client.

    Via SDK

    It is recommended to use the encapsulated SDK to call the API.

    Via API

    For usage, please see the documents in the API links above. The syntax of each API is as follows:

    PUT <ObjectName> HTTP/1.1
    Host: <BucketName>-<APPID>.cos.<Region>.myqcloud.com
    Date: GMT Date
    Authorization: Auth String

    The following variables in the syntax take the values in the return result of the ApplyUpload API:

    • <ObjectName> is MediaStoragePath (or CoverStoragePath for a cover file).
    • <BucketName>-<APPID> is StorageBucket.
    • <Region> is StorageRegion.

    For API requests, note the following:

    • For the Authorization signature, use SecretId and SecretKey in TempCertificate in the return result of the ApplyUpload API. For the calculation method, please see Request Signature.
    • Pass in the x-cos-security-token field (identifying the security token used in the request) in the HTTP header or form-data of the POST request packet, and assign it the value of the Token field in TempCertificate.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support