Adds ACL to existing ACL for object or bucket.

storeAddACL(url, ACLObject); → returns void

Argument Reference

url string

Amazon S3 URLs (content or object).

ACLObject array

An array of struct where each struct represents a permission or grant as discussed in ACLObject.

Sample code invoking the storeAddACL function

Use this function to add permissions to the existing ones.

 <cfset dir = 's3://bucket_name/'> 
     <cfset perm = structNew()> 
     <cfset = 'authenticated'> 
     <cfset perm.permission = 'READ'> 
     <cfset perm1 = structNew()> 
     <cfset = 'email_ID'> 
     <cfset perm1.permission = 'READ_ACP'> 
     <cfset myarrray = [perm,perm1]> 
     <cfif NOT directoryExists(dir)> 
         <cfset directoryCreate(dir)> 
     <cfset fileWrite('#dir#/Sample.txt','This is to test storeAddACL')> 
     <cfset storeAddACL('#dir#','#myarrray#')> 
     <cfset test = storeGetACL(dirkey)> 
         <cfdump var='#test#'> 
         <cfdump var='#cfcatch#'> 

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub