1
我一直在試圖通過SDK來上傳圖片,但我得到這個錯誤:致命錯誤:未捕獲的AWS 冰川異常 GlacierException:AWS錯誤代碼:,狀態代碼:400,AWS請求
致命錯誤:未捕獲的Aws \ Glacier \ Exception \ GlacierException:AWS錯誤代碼:,狀態碼:400,AWS請求標識:,AWS錯誤類型:客戶端,AWS錯誤消息:,用戶代理:aws-sdk-php2/2.4.3 /3.7.2捲曲/ 7.15.5 PHP/5.3.8 /www/site/test/Aws/Common/Exception/NamespaceExceptionFactory.php扔在線路91
,這是我的測試代碼:
<?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);
任何幫助是極大的讚賞:)
感謝非常很多,O(∩_∩)O – user2688100