for amazon s3, i am using the sdk by ortus, i am t...
# box-products
g
for amazon s3, i am using the sdk by ortus, i am trying to figure which method replaces this one StoreSetACL (cf inbuild functionality, wants to give access of read_write to a single email address)
j
g
how i will pass the struct to it with regards to email
my current Code is like this
Copy code
perm = structnew();
				perm.group = "all";
				perm.permission = "FULL_CONTROL";
				perm1 = structnew();
				perm1.email = "<mailto:webster@domain.com|webster@domain.com>";
				perm1.permission = "FULL_CONTROL";
				myarrray = arrayNew(1);
				myarrray = [perm,perm1];
j
Per the docs:
> acl - The security policy to use. Specify a canned ACL like "public-read" as a string, or provide a struct in the format of the "grants" key returned by getObjectACL()
So call getObjectACL on an existing object and then you can use that as your template for the above keys
g
it reuires string uri, i am not sure of that, bucketname is straight fed
j
uri is an optional argument to that method
> uri - An optional resource uri to set the ACL.
>
g
but its not optional, its required
j
No, it’s optional https://github.com/coldbox-modules/s3sdk/blob/master/models/AmazonS3.cfc#L411 Just use named arguments or pass in an empty string (the default) in the positional arguments
g
oh ots setone, i was looking at getObjectACL, so i should pass the ACL as above parameters
j
If you are looking to set the ACL for a bucket, you can just call getAccesControlPolicy on the bucket with no uri
g
got it, and managed to fix it, Thanks a lot
🙂 1
i disabled the public access, but now my images are not viewable, what policy should i update so at least it has some public read access to images and pdf '