我正在遇到此异常
Error getting value from 'Position' on 'Amazon.Runtime.Internal.Util.MD5Stream'.
当尝试从aws s3存储桶读取文件时。
这是我的C#代码
try
{
var s3ObjectPath = $"users/{email.Id}/emailattachments/{item.AttachedFileName}";
var ifExists = await this.Exists(s3ObjectPath);
if (ifExists)
{
Stream attachment = await s3Client.GetObjectStreamAsync(attachmentS3BucketName, s3ObjectPath, dicData);
Attachment att = new Attachment(attachment, item.AttachedFileName);
attachments.Add(att);
}
}
catch (AmazonS3Exception ex)
{
}
但是,有时这是可行的。我到处搜索,但找不到解决方案。
提前谢谢!