c# - 例外:从“Amazon.Runtime.Internal.Util.MD5Stream”上的“位置”获取值时出错
问题描述
我正面临这个例外
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)
{
}
然而,这有时是有效的。我到处搜索,但没有找到解决方案。
提前致谢!!
解决方案
推荐阅读
- javascript - 为什么这个 Css 类条件在 react js 中不起作用?
- java - 如何根据用户访问权限从数据库中过滤记录
- android - Firebase Firestore:没有互联网连接时是否有回调?
- c# - 如何获取 Binding 生成的元素的宽度?
- android - 在定义 Android Manifest 中的兼容性时,哪种方式是正确的?
- c# - 我的自动测试失败,因为它无法专注于弹出窗口
- javascript - 如何在 Node.js 服务器和 React 客户端应用程序之间共享 config.file?
- ios - SwiftUI:如何在按钮单击 + API 调用后显示下一个视图
- python - Pandas 聚合中的自定义函数
- linux - 通过电子邮件发送时,输出文本中未显示颜色