storeSetMetadata

Sets the metadata on bucket or object.

storeSetMetadata(url,Struct);

This function requires Adobe ColdFusion. Not supported on Lucee, OpenBD, etc.

Argument Reference for the storeSetMetadata function

url

Required: Yes
Amazon S3 URLs (bucket or object).

region

Required: Yes
Represents the metadata. See Standard keys for a list of standard keys in metadata.You can also have custom metadata apart from the standard ones.

Examples sample code invoking the storeSetMetadata function


Tag Syntax

<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#'> 

Fork me on GitHub