0
我正在使用AWSSDK.S3 version 3.3.10.2
,AWSSDK.CORE版本3.3.17.6
。Amazon S3 TransferUtilityUploadRequest超時不起作用
我試圖超時添加到TransferUtility.Upload
功能
我跟着文檔寫在這裏:http://docs.aws.amazon.com/sdk-for-net/v2/developer-guide/retries-timeouts.html
這是我的代碼:
m_AmazonS3Config.Timeout = TimeSpan.FromMilliseconds(1);
m_AmazonS3Config.ReadWriteTimeout = TimeSpan.FromMilliseconds(1);
using (IAmazonS3 s3Client = new AmazonS3Client(m_AmazonS3Config))
{
var fileTransferUtility = new TransferUtility(s3Client);
var fileTransferUtilityRequest = new TransferUtilityUploadRequest
{
BucketName = bucketName,
Key = key,
InputStream = fileStream,
};
fileTransferUtility.Upload(fileTransferUtilityRequest);
}
我試着上傳大文件,超時沒有打,爲什麼呢?