MAKE FILE PUBLIC #24

Open
isimpledesign opened this Issue Mar 9, 2012 · 0 comments

Comments

Projects
None yet
1 participant
@isimpledesign

Hi

I am trying to make all file in a bucket public so i can make the stream i am not able to do this with the following code.

putBucket($bucket, S3::ACL_PUBLIC_READ); if (($contents = $s3->getBucket($bucket)) !== false) { foreach ($contents as $object) { $fname = $object['name']; if (($acp = S3::getAccessControlPolicy($bucket,$fname)) !== false) { echo "
";
                print_r($acp);
                echo "
"; // Here you would modify the $acp array... // For example, grant access to the S3 LogDelivery system: $acp["acl"][] = array( "type" => "Group", "uri" => "http://acs.amazonaws.com/groups/s3/LogDelivery", "permission" => "FULL_CONTROL" ); // Then update the policy using the modified $acp array: if (S3::setAccessControlPolicy($bucket, $fname, $acp)) { echo $fname . "Policy updated"; } } } } ``` ?>

Can you help with this???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment