Help Center > Object Storage Service > FAQ > Object Metadata > What Can I Do with Object Metadata?

What Can I Do with Object Metadata?

Metadata is the data that mainly describes objects' attributes. Object metadata is a set of name-value pairs that are part of object management.

Table 1 lists three kinds of system-defined metadata that OBS currently supports.
Table 1 Three kinds of system-defined metadata that OBS currently supports

Name

Description

ContentDisposition

Provides a default file name for the object that is being requested. When an object is being downloaded or accessed, the file with the default file name is directly displayed in the browser or a download dialog box is displayed if the file is being accessed.

For example, select ContentDisposition as the metadata name and enter attachment;filename="testfile.xls" as the metadata value for an object. If you access the object through a link, a dialog box is directly displayed for downloading objects, and the object name is changed to testfile.xls.

ContentLanguage

Specifies the language of the object content.

For example, select ContentLanguage as the metadata name and enter en-us as the metadata value for an object. If you access the object, the object content is displayed in English by default.

WebsiteRedirectLocation

Redirects an object to another object or an external URL. The redirection function is implemented using static website hosting.

For example, select a bucket and click Bucket Attribute. On the page that is displayed, click the Static Website Hosting tab. On the page that is displayed, enter object name testobject.txt in the Default Home Page text box to configure static website hosting. Go to the Object page. Select WebsiteRedirectLocation as the metadata name and enter http://www.example.com as the metadata value for object testobject.txt. If you access object testobject.txt using the Endpoint on the Static Website Hosting page, the access request is redirected to http://www.example.com.

Registration