Obtaining Object Simply

Last updated: 2019-11-13 15:17:53

PDF

Use Cases

You can initiate a request to obtain objects directly in COS. You have the following options when obtaining an object:

  • Obtain a complete object: Obtain the complete object data directly by initiating a GET request.
  • Obtain a part of an object: Use the Range request header in a GET request to retrieve a specific range of bytes of an object. Retrieving multiple ranges is not supported.

The object's metadata will be returned along with the object's content as an HTTP response header. The GET request supports overwriting certain metadata values in the response using URL parameters.
For example, the response value of Content-Dispositon can be overwritten. Response headers that support modification include:

  • Content-Type
  • Content-Language
  • Expires
  • Cache-Control
  • Content-Disposition
  • Content-Encoding

Directions

Via the COS Console

You can obtain an object in the COS Console. For more information, see Downloading Objects in Console Guide.

Via REST API

You can use the REST API directly to initiate an object obtaining request. For more information, see GET Object.

Via the SDK

You can directly call the object download method in the SDK. For more information, see the SDK documentation for the corresponding programming language below: