Object Metadata Overview
Object metadata is a set of name-value pairs that are part of object management.
Currently, only the metadata defined by the system is supported.
The metadata defined by the system is classified into the following types: system-controlled and user-controlled. For example, metadata such as Last-Modified is controlled by the system and cannot be modified. You can call the API to modify the metadata such as ContentLanguage. The metadata that can be modified is described as follows:
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. For details, see the definition about ContentDisposition in HTTP. |
ContentLanguage |
Indicates the language or languages intended for the audience. Therefore, a user can differentiate according to the user's preferred language. For details, see the definition about ContentLanguage in HTTP. |
WebsiteRedirectLocation |
Redirects an object to another object or an external URL. The redirection function is implemented using static website hosting. For example, you can perform the following operations to implement object redirection:
|
ContentEncoding |
Content encoding format when an object is downloaded. The options are as follows:
|
CacheControl |
Cache behavior of the web page when the specified object is downloaded.
|
Expires |
Cache expiration time (GMT) |
ContentType |
File type of an object. For details, see About Object Metadata Content-Type. |
- When versioning is enabled for a bucket, you can set metadata for objects which are Latest Version, but cannot set metadata for objects which are Historical Version.