我尝试了以下两种方法,但它们仍然允许使用https://bucket-example.s3.amazonaws.com/mwnl.json等网址访问该文件
(网址只是一个例子)
$result = $s3Client->putObject(array(
'ACL' => 'private',
'Bucket' => $bucket,
'Key' => 'mwnl.json',
'Body' => $json
));
和...
$result = $s3Client->putObjectAcl(array(
'ACL' => 'private',
'Bucket' => $bucket,
'Key' => 'mwnl.json',
'Body' => $json
));