
265
DEVELOPING
COLDFUSION 9 APPLICATIONS
Developing CFML Applications
Las
t
upda
te
d 8/5/2010
Using metadata
Amazon S3 allows you to specify metadata for both objects and buckets.
The following two functions let you get and set the metadata on objects or buckets.
StoreGetMetadata
Description
Returns the metadata related to the object or bucket.
Returns
Object metadata or bucket metadata
Syntax
StoreGetMetadata(url)
Parameters
History
ColdFusion 9 Update 1: Added this function
Example
<cfdump var = #StoreGetMetadata("bucket_Name")#>
StoreSetMetadata
Description
Sets the metadata on bucket or object.
Returns
Nothing
Syntax
StoreSetMetadata(url,Struct)
Parameters
Parameter
Description
url
Amazon S3 URLs (bucket or object).
Parameter
Description
url
Amazon S3 URLs (bucket or object).
struct
Represents the metadata. See “
Standard keys
” on page
266 for a list of standard keys in metadata.
You can also have custom metadata apart from the standard ones.