COS provides APIs that are compatible with AWS S3. For more information, please see Accessing COS Using the AWS S3 SDK.
There are two possible causes:
For the former case, you are advised to get a new valid request signature before using the API. For the latter case, you need to sync your system time with the time in your time zone.
First, call the
ListMultipartUploads API to list the multipart uploads. Then, call
Abort Multipart upload to abort the multipart upload and delete the uploaded parts.
Check the object path, which should not start with a
If the values of
partNumber are the same, newly uploaded parts will overwrite previous ones. If
uploadId does not exist, “404 NoSuchUpload” will be returned. For more information, please see Upload Part.
You can call the
PUT Object - Copy API to modify
x-cos-storage-class. For more information, please see PUT Object - Copy.
A timestamp is used to determine whether the COS signature has expired and it cannot be set to permanent. If you use a permanent key to generate the signature and want the signature to be permanent, you can set the timestamp to be a long time (for example, 50 years) after the current time. If your signature is generated using a temporary key, which is valid for only up to 2 hours, your signature will also be valid for only 2 hours.
Yes. You can call GET Bucket (List Objects) to query the size of an object.
You can call PUT Object - Copy to copy the object and specify a name for the replicas.
You can call the HEAD Bucket API to query the bucket domain name. The
x-cos-bucket-region parameter in the response header indicates the region where the bucket resides.
COS does not provide an API to query the bucket size. You are advised to use Cloud Monitor APIs to query the storage by storage class, and then sum up the storage of each storage class to get the bucket size.
Technically speaking, COS does not have directories or folders. In fact, folders displayed in the console are empty objects whose names end with a slash (/).
You can call the PUT Object API and upload an empty object whose name ends with a slash (/).
COS does not have the concepts of directories or folders. To make COS more user-friendly, COS simulates folders/directories in GUIs such as the console and COSBrowser. You can create an empty object whose name ends with a slash (/), and it will be displayed as a folder.
COS APIs support only deleting a single file. If you need to delete the entire directory, you can call the GET Bucket (List Objects) API to obtain the list of all objects that have the same specified prefix. Then, call DELETE Object to delete them.
You can use
x-cos-storage-tier returned for the HEAD Object API to query the access tier of your object.
GET ObjectAPI, can I download the dynamically specified content that is returned as an attachment?
When you call
GET Object, carry the response-content-disposition parameter in the URL and set its value to attachment. Note that this kind of
GET Object requests require a signature carried. You can generate a signature using COS’s signature generation tool.
Check whether the file exists. If yes, the error is usually caused because the slash (/) is missing from the folder’s key. You can add the slash and then retry.
COS does not provide such an API. However, you can Set Logging and then obtain the requested times by analyzing the logs.