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??
}