diff --git a/vas/rest/class/vmlib/phpUtil.inc b/vas/rest/class/vmlib/phpUtil.inc index fc0694c8c7db23de6e0cf63cdb466a5945a91185..7c1db3254acaf862890e43a0e405dd135917c53e 100755 --- a/vas/rest/class/vmlib/phpUtil.inc +++ b/vas/rest/class/vmlib/phpUtil.inc @@ -159,7 +159,8 @@ function stripslashes_deep($aString) { $aResult = $s3->putObject(array( 'Bucket' => $sBucket, 'Key' => $sServerPath, - 'Body' => file_get_contents($sTmpFile) + 'Body' => file_get_contents($sTmpFile), + 'GrantRead' => 'uri=http://acs.amazonaws.com/groups/global/AllUsers' )); } else if (!copy($sTmpFile, $sServerPath)) { @@ -513,7 +514,8 @@ function stripslashes_deep($aString) { $aResult = $s3->putObject(array( 'Bucket' => $sBucket, 'Key' => $sPrefix . str_replace($properties['ws_data_dir'], "/ws_data", $sFilePath) . $aFileStruct["name"], - 'Body' => file_get_contents($aFileStruct["tmp_name"]) + 'Body' => file_get_contents($aFileStruct["tmp_name"]), + 'GrantRead' => 'uri=http://acs.amazonaws.com/groups/global/AllUsers' )); unlink($aFileStruct["tmp_name"]); @@ -1635,7 +1637,7 @@ function putFileContentInWsDataDir($sModule, $sObject, $mId = '', $sField = '', 'Bucket' => $sBucket, 'Key' => $sServerPath, 'Body' => $sFileContent, - 'ACL' => 'public-read' + 'GrantRead' => 'uri=http://acs.amazonaws.com/groups/global/AllUsers' )); } catch(Aws\S3\Exception\S3Exception $e) {