c# - Azure Data Box 使用 C# 上传文件
问题描述
我正在尝试使用 C# 将文件上传到 Azure Data Box,但遇到了问题。这是我的代码:
private void uploadBlob()
{
String storageconn = ConfigurationManager.AppSettings.Get("StorageConnectionString");
BlobServiceClient blobServiceClient = new BlobServiceClient(storageconn);
BlobContainerClient container = blobServiceClient.GetBlobContainerClient("democontainer");
Guid guid = Guid.NewGuid();
String filename = guid.ToString();
BlobClient blobClient = container.GetBlobClient(filename);
byte[] memoryArray = new byte[3252224];
var strm = new MemoryStream(memoryArray);
blobClient.Upload(strm);
strm.Close();
}
当 blobClient.Upload 方法执行时,我收到以下错误:
httpheaders 之一的值格式不正确
有人对问题所在有任何想法吗?
解决方案
推荐阅读
- mongodb - 如何在 MongoDB 中使用 map reduce 求平均值?
- r - 如何在ggplot中修改x轴上的时间?
- php - 如何在 Term_Meta 上解析图像附件的 URL?
- variables - 如何使用方法更改变量的值?
- flutter - 如何在 Flutter 中添加虚线
- haskell - 比较中的 Monoid 实例在哪里定义?
- javascript - 在UI5表格的不同行中添加不同的控件
- spring - 使用spring上传/下载到文件服务器的最佳方法?
- python - Python 3.x:对循环中的数据帧字典进行分析
- reactjs - 如何使用 axios 补丁请求发送 FormData?