I've been trying to upload image through the SDK but i get this error:
Fatal error: Uncaught Aws\Glacier\Exception\GlacierException: AWS Error Code: , Status Code: 400, AWS Request ID: , AWS Error Type: client, AWS Error Message: , User-Agent: aws-sdk-php2/2.4.3 Guzzle/3.7.2 curl/7.15.5 PHP/5.3.8 thrown in /www/site/test/Aws/Common/Exception/NamespaceExceptionFactory.php on line 91
And this is my test code:
<?php
// Include the SDK using the Composer autoloader
require 'aws-autoloader.php';
use Aws\Glacier\GlacierClient;
$client = GlacierClient::factory(array(
'key' => 'xxxxxxx',
'secret' => 'xxxxxxxx',
'region' => 'us-east-1' // (e.g., us-west-2)
));
$vaultName = 'http://xxx.xxx.xxx/vrs/images/album/default/pp.jpg';
$filename = '/www/site/test/pp.jpg';
$result = $client->uploadArchive(array(
'vaultName' => $vaultName,
'body' => fopen($filename, 'r'),
));
$archiveId = $result->get('archiveId');
var_dump($archiveId);
Any help is greatly appreciated :)