download free 30 days trial version buy bucket explorer
Documentation  Download  Purchase  Support  FAQs   Forum   ScreenShots & Demos

Bucket Explorer : Store Amazon S3 objects with Custom Header or Metadata

When any file is shared to and from the web server, it uses some or other protocol, and then these protocols also transmit some common information in header section of that particular file. This information provides some basic and important details about the file such as file type, date of creation/modification etc.

The attached information can be of two types; Protocol defined and user defined . Protocol defined information is attached automatically as defined in specifications of that protocol. This information helps the files to be recognized under that protocol domain. User defined Metadata on the other hands is specified by the creator of file. This information helps the receiver to understand the file details without the need to open it. We can understand this metadata by the example of “ Content-type ” which is system defined.

Content Type ” has different values as per file type. It shows the type of file which is stored on the server.

Sr. No Value Description
1 text/plain simple text messages
2 text/html Html content
3 image/jpg images
4 audio/mp3 Audio
5 video/mp4 Video
6 application/mswork Application

Amazon S3 also offers both aforementioned Meta Data types.Each Amazon S3 object has a set of key-value pairs with which it is associated. There are two kinds of metadata: system metadata, and user metadata.

System metadata is used and is sometimes processed by Amazon S3. It depends on API (REST or SOAP) being used. User Meta data has nothing to do with Amazon’s functionality. It is simply a piece of information that creator of file includes to make it clear as far as understanding is concerned. Meta data added by user can be of any length but must conform to US-ASCII when using REST and UTF-8 when using SOAP or browser-based uploads through POST. .

For both REST and SOAP requests to Amazon S3, user metadata size is limited to 2k bytes for the total length of all values and keys.

Metadata Interoperability via REST and SOAP:

When user metadata keys get stored using REST, it must begin with "x-amz-meta-" which distinguish them as custom HTTP headers. When this metadata is retrieved via SOAP, the x-amz-meta- prefix is removed. Similarly, metadata stored via SOAP will have x-amz-meta- added as a prefix when it is retrieved via REST or HTTP, except the Content-Type header.

When metadata is retrieved through the REST API, Amazon S3 combines headers that have the same name (ignoring case) into a comma-delimited list. If some metadata contains unprintable characters, it is not returned. Instead, the "x-amz-missing-meta" header is returned with a value of the number of the unprintable metadata entries.

Few of the custom header samples are given below:

1. Expires suggested expiration time

Syntax: "Expires" ":" HTTP-date
Example: Expires: Thu, 31 st Dec 2009 16:00:00 GMT

2. From author(s) or person(s) who taking responsibility for the message

Syntax: "From" ":" mailbox
Example: From: info@chambal.com

Related Topics :


 

Give us your feedback