Whatever message this page gives is out now! Go check it out!

StoreSetMetadata

Last update:
May 18, 2026
Description
Sets the metadata on bucket or object.
Returns
Nothing
Syntax
StoreSetMetadata(url,Struct)
Parameters
Parameter
Description
url
Amazon S3 URLs (bucket or object).
struct
Represents the metadata. See Standard keys (in this page) for a list of standard keys in metadata.You can also have custom metadata apart from the standard ones.
See also
History
ColdFusion 9 Update 1: Added this function
Example
<cfscript> 
    mydate = #Now()#; 
    hello = structNew(); 
    hello.color = "grey"; 
</cfscript> 
 
<cfset dir = "s3://mycfbucket"> 
<cffile action="write" file="#dir#/hello5.txt" output="Sample s3 text"> 
 
<cfset StoreSetMetadata("#dir#/hello5.txt","#hello#")> 
<cfset test = StoreGetMetadata("#dir#/hello5.txt")> 
 
<cfdump var="#test#">
Standard keys
The following are the standard keys in the metadata:
For objects:
  • last_modified
  • date
  • owner
  • etag
  • content_length
  • content_type
  • content_encoding
  • content_disposition
  • content_language
  • content_md5
  • md5_hash
For buckets:
  • date
  • owner

More like this

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page