Updated on 2026-08-03 GMT+08:00

obs_put_properties

Table 1 obs_put_properties

Parameter

Type

Mandatory (Yes/No)

Description

content_type

char *

Yes

Explanation:

It specifies the file type of an object when it is downloaded.

Restrictions:

None

Value range:

See the Content-Type values defined in HTTP.

Default value:

None

md5

char *

Yes

Explanation:

Indicates the base64-encoded digest of the object data. It is provided for the OBS server to verify data integrity. The OBS server will compare this MD5 value with the MD5 value calculated based on the object data. If the two values are not the same, HTTP status code 400 is returned.

Restrictions:

The MD5 value of the object must be Base64 encoded. If the MD5 value is not specified, the OBS server will not verify the MD5 value of the object.

Value range:

Base64-encoded 128-bit MD5 value of the request body calculated according to RFC 1864.

Example: n58IG6hfM7vqI4K0vnWpog==

Default value:

None

cache_control

char *

Yes

Explanation:

It specifies the cache behavior of the web page when an object is downloaded.

Restrictions:

None

Value range:

See the Cache-Control values defined in HTTP.

Default value:

None

content_disposition_filename

char *

Yes

Explanation:

It specifies the name of an object when it is downloaded. For example, if the value is set to test.txt, that is equivalent to adding the Content-Disposition: attachment; filename=test.txt header.

Restrictions:

None

Value range:

See the Content-Disposition values defined in HTTP.

Default value:

None

content_encoding

char *

Yes

Explanation:

It specifies the content encoding format when an object is downloaded.

Restrictions:

None

Value range:

See the Content-Encoding values defined in HTTP.

Default value:

None

website_redirect_location

char *

Yes

Explanation:

If the bucket is configured with website hosting, the request for obtaining the object can be redirected to another object in the bucket or an external URL.

To another object in the same bucket:

x-obs-website-redirect-location:/anotherPage.html

To an external URL:

x-obs-website-redirect-location:http://www.example.com/

Restrictions:

The value must start with a slash (/), http://, or https:// and cannot exceed 2 KB.

Value range:

None

Default value:

None

get_conditions

obs_get_conditions *

No

Explanation:

Specifies a series of parameters for copying an object.

Restrictions:

None

Value range:

None

Default value:

None

start_byte

uint64_t

No

Explanation:

Where the copy starts in the object

Value range:

0 (included) to the object length minus 1 (not included), in bytes

Default value:

0 (The copy starts from the first byte of the object.)

byte_count

uint64_t

No

Explanation:

Specifies the copy length.

Value range:

  • Value: an integer greater than 0
  • If the sum of start_byte and byte_count is greater than the object length minus 1, the object length minus 1 is used. The unit is byte.

Default value:

None

upload_limit

uint64_t

No

Explanation:

Bandwidth limit for single connection requests.

Value range:

819200 to 838860800, in bit/s

Default value:

None

expires

int64_t

No

Explanation:

Specifies the cache expiration time of the web page when the object is downloaded.

Default value:

None

obs_expires

int64_t

No

Explanation:

Specifies when an object expires. It is measured in days. Once the object expires, it is automatically deleted.

Restrictions:

The value must be greater than the number of days that have passed since the object was created. For example, if the object was uploaded 10 days ago, you must specify a value greater than 10.

Value range:

The value is an integer greater than 0.

Default value:

None

canned_acl

obs_canned_acl

No

Explanation:

Access control policy

Restrictions:

None

Value range:

None

Default value:

None

az_redundancy

obs_az_redundancy

No

Explanation:

Multi-AZ redundancy policy specified when a bucket is created.

Restrictions:

None

Value range:

Multiple AZs or a single AZ.
  • Single-AZ: OBS_REDUNDANCY_1AZ
  • 3AZ: OBS_REDUNDANCY_3AZ

Default value:

None

meta_data_count

int

No

Explanation:

Number of elements in the meta_data array.

Restrictions:

None

Value range:

None

Default value:

None

meta_data

obs_name_value*

No

Explanation:

Custom metadata of the object. OBS allows you to use custom metadata to manage objects. When you retrieve or query the metadata of the object, the added custom metadata headers will be returned in the response.

Restrictions:

  • If a request carries this header field, the response message must contain this header field.
  • The total size of all custom metadata cannot exceed 8 KB. To measure the size, calculate the sum of bytes of all UTF-8 encoded keys and values.
  • The custom metadata keys are case-insensitive, but are stored in lowercase by OBS. The key values are case-sensitive.
  • Both custom metadata keys and their values must conform to US-ASCII standards. If non-ASCII or unrecognizable characters are required, they must be encoded and decoded in URL or Base64 on the client, because the server does not perform such operations.

Value range:

None

Default value:

None

metadata_action

metadata_action_indicator

No

Explanation:

Metadata operation directive.

Value range:

  • REPLACE_NEW: The metadata that has an existing value is replaced. A value is assigned to the metadata that does not have a value. The metadata that is not specified remains unchanged. Custom metadata is replaced.
  • REPLACE uses the complete header carried in the current request to replace the original one and deletes the metadata that is not specified.

Default value:

None

server_callback

obs_upload_file_server_callback

No

Explanation:

Parameters related to server callback.

Restrictions:

None

Value range:

None

Default value:

None

Table 2 obs_get_conditions

Parameter

Type

Mandatory (Yes/No)

Description

start_byte

uint64_t

No

Explanation:

Start position for object download.

Value range:

0 (included) to the object length minus 1 (not included), in bytes

Default value:

0 (downloading from the first byte of the object)

byte_count

uint64_t

No

Explanation:

Specifies the length of the file to be downloaded.

Value range:

  • Value: an integer greater than 0
  • If the sum of start_byte and byte_count is greater than the object length minus 1, the object length minus 1 is used. The unit is byte.

Default value:

None

download_limit

uint64_t

No

Explanation:

Bandwidth limit for single connection requests.

Value range:

819200 to 838860800, in bit/s

Default value:

None

if_modified_since

int64_t

No

Explanation:

The request succeeds if the object has been modified since the specified time; otherwise, an error is returned.

if_not_modified_since

int64_t

No

Explanation:

If the object has not been modified after the specified time, the request is successful. Otherwise, an error is returned.

if_match_etag

char *

No

Explanation:

Preset ETag. If the ETag of the object to be downloaded or copied is the same as the preset ETag, the request succeeds. Otherwise, an error is returned.

Value range:

The value must contain 32 characters.

Default value:

None

if_not_match_etag

char *

No

Explanation:

Specifies a preset ETag value. If the ETag value of the object to be downloaded or copied is different from the value of this parameter, the request is successful. Otherwise, an error is returned.

Value range:

The value must contain 32 characters.

Default value:

None

image_process_config

image_process_configure *

No

Explanation:

Image processing parameters.

Restrictions:

None

Value range:

None

Default value:

None

Table 3 metadata_action_indicator

Constant

Original Value

Description

OBS_NO_METADATA_ACTION

-

Default invalid value.

OBS_REPLACE

REPLACE

Uses the complete header carried in the current request to replace the original one and deletes the metadata that is not specified.

OBS_REPLACE_NEW

REPLACE_NEW

The metadata that has an existing value is replaced. A value is assigned to the metadata that does not have a value. The metadata that is not specified remains unchanged. Custom metadata is replaced.

Table 4 obs_upload_file_server_callback

Parameter

Type

Mandatory (Yes/No)

Description

callback_url

char *

Yes

Explanation:

After an object is uploaded successfully, OBS sends a callback request to the URL using the POST method.

You can specify a maximum of 10 URLs. Use semicolons (;) to separate URLs.

URL-encoding is required.

Restrictions:

None

Value range:

None

Default value:

None

callback_host

char *

No

Explanation:

Value of the host header in the callback request. If this parameter is not specified, the value of host parsed from the callbackUrl parameter is used.

Restrictions:

None

Value range:

None

Default value:

None

callback_body_type

char *

No

Explanation:

Value of the Content-Type header in the callback request. application/x-www-form-urlencoded and application/json are supported. If this parameter is not specified, the default value is as follows:

application/json

Restrictions:

None

Value range:

None

Default value:

None

Table 5 image_process_configure

Parameter

Type

Mandatory (Yes/No)

Description

image_process_mode

image_process_mode_type

No

Explanation:

Image processing parameters.

Restrictions:

None

Value range:

None

Default value:

None

cmds_stylename

char *

No

Explanation:

Image processing parameters.

Restrictions:

None

Value range:

None

Default value:

None

Table 6 image_process_mode_type

Constant

Original Value

Description

obs_image_process_invalid_mode

-

Default invalid value.

obs_image_process_cmd

image

Image processing parameters start with image.

obs_image_process_style

style

Image processing parameters start with style.