0
我已按照本教程http://blog.fineuploader.com/2013/08/16/fine-uploader-s3-upload-directly-to-amazon-s3-from-your-browser/上傳圖片到帶有fineuploader的Amazon S3並正常上傳。問題出在我想看看我上傳到S3的圖片。顯示fineuploder上傳到Amazon 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
當我運行這個測試exampel
<?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上傳的圖片,以及如果我必須在亞馬遜上進行任何設置(除了我從fineuploader博客上所做的)?