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. 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 limited by 2 kb in size over all. Few of the custom header samples are given below:
1.
Expires
suggested expiration time
Syntax:
"Expires" ":" HTTP-date
Example:
Expires: Wed, 31 Dec 2008 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
Click to see "
How to store files with custom header/metadata using Bucket Explorer?
". Click to know more about
custom headers
.