显示由 fineuploder 上传到 Amazon S3 的图像?

Display images uploaded by fineuploder to Amazon S3?

我已按照本教程 http://blog.fineuploader.com/2013/08/16/fine-uploader-s3-upload-directly-to-amazon-s3-from-your-browser/ 使用 fineuploader 将图像上传到 Amazon S3,并且上传工作正常。问题是当我想查看已上传到 S3 的图片时。

我收到错误

[06-Jan-2015 12:30:19 Europe/Berlin] PHP Fatal error:  Uncaught Aws\S3\Exception\AccessDeniedException: AWS Error Code: AccessDenied, Status Code: 403, AWS Request ID: 6F9935EA1BE9F4F5, AWS Error Type: client, AWS Error Message: Access Denied, User-Agent: aws-sdk-php2/2.7.12 Guzzle/3.9.2 curl/7.24.0 PHP/5.3.28 ITR
  thrown in /home/connecti/public_html/aws/Aws/Common/Exception/NamespaceExceptionFactory.php on line 91

当我run这个测试example

<?php
require 'aws/aws-autoloader.php';
use Aws\S3\S3Client;

// Instantiate the S3 client with your AWS credentials
$s3 = S3Client::factory(array(

'key' => 'MY_KEY',
'secret' => 'MY_SECRET_KEY',
));


$bucket = 'MY_BUCKET';

// Use the high-level iterators (returns ALL of your objects).
$objects = $s3->getIterator('ListObjects', array('Bucket' => $bucket));

echo "Keys retrieved!\n";
foreach ($objects as $object) {
    echo $object['Key'] . "\n";
}

// Use the plain API (returns ONLY up to 1000 of your objects).
$result = $s3->listObjects(array('Bucket' => $bucket));

echo "Keys retrieved!\n";
foreach ($result['Contents'] as $object) {
    echo $object['Key'] . "\n";
}

?>

我的密钥、密钥和存储桶都是正确的!

与其他示例相同。

我需要做什么?谁能举例说明我如何显示由 fineuploader 上传的图片以及是否必须在 Amazon 上进行任何设置(除了我在 fineuploader 博客中所做的设置)?

错误消息表明服务器端密钥没有适当的权限来对有问题的存储桶进行 ListObjects 或某些相关调用。您需要重新评估与您的服务器端密钥关联的 IAM user/group,并确保它具有所有必需的分配权限。