使用以下代码获取错误
TransferUtility不包含UploadAsync的定义
TransferUtility fileTransferUtility = new TransferUtility(s3Client);
TransferUtilityUploadRequest uploadRequest = new TransferUtilityUploadRequest
{
BucketName = "bucketname",
FilePath = "foldername",
Key = "filename",
InputStream = "file input Stream"
};
uploadRequest.UploadProgressEvent +=
new EventHandler<UploadProgressArgs>(uploadRequest_UploadPartProgressEvent);
await fileTransferUtility.UploadAsync(uploadRequest);
答案 0 :(得分:0)
最后我得到了解决方案,我使用的是3.3.102.9版的AWSSDK.S3和4.0版的.Net。
要使用UploadAsync()
,需要3.3.102.11版本的AWSSDK.S3,并且需要.Net 4.5或更高版本。