2016-08-04 30 views
0

我一直試圖在SDK中使用官方SDK中的C++使用TransferClient。但是當我運行下面的代碼時,我沒有得到一個人類可讀的字符串。想法?TransferClient在操作失敗後不返回錯誤消息

TransferClientConfiguration transferConfig; 
transferConfig.m_uploadBufferCount = 20; 

static const char* ALLOCATION_TAG = "TransferTests"; 
ClientConfiguration config;  
std::shared_ptr<S3Client> m_s3Client = Aws::MakeShared<S3Client>(ALLOCATION_TAG, config, false); 
std::shared_ptr<TransferClient> m_transferClient = Aws::MakeShared<TransferClient>(ALLOCATION_TAG, m_s3Client, transferConfig); 
std::string s3path = "akey"; 
std::shared_ptr<UploadFileRequest> requestPtr = m_transferClient->UploadFile(filepath.string(), "testbucket", s3path.c_str(), "", false, true); 
requestPtr->WaitUntilDone(); 
if (!requestPtr->CompletedSuccessfully()) 
{ 
    // requestPtr->GetFailure() returns a blank string here?? 
} 

回答

0

找出問題了!事實證明,存儲桶位於us-west-1,並且由於某種原因,具有默認客戶端選項的轉移客戶端不起作用。

相關問題