StoreAddACL(url, ACLObject) |
Parameter |
Description |
---|---|
url |
Amazon S3 URLs (content or object). |
ACLObject |
An array of struct where each struct represents a permission or grant as discussed in ACLObject. |
See also
StoreGetACL, StoreSetACL, Optimizing ColdFusion applications
History
ColdFusion 9 Update 1: Added this function
Usage
Use this function to add permissions to the existing ones.
Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | < cfset perm = structnew ()> < cfset perm.group = "authenticated" > < cfset perm.permission = "READ" > < cfset perm1 = structnew ()> < cfset perm1.email = "email_ID" > < cfset perm1.permission = "READ_ACP" > < cfset myarrray = [perm,perm1]> < cfif NOT DirectoryExists (dir)> < cfset directoryCreate(dir)> </ cfif > < cfset fileWrite ( "#dir#/Sample.txt" , "This is to test StoreAddACL" )> < cfset StoreAddACL( "#dir#" , "#myarrray#" )> < cfset test = StoreGetACL(dirkey)> < cfdump var= "#test#" > < cfcatch > < cfdump var= "#cfcatch#" > </ cfcatch > </ cftry > |