【问题标题】:Gettings blobs from a container using Microsoft.Azure.Storage.Blob [closed]使用 Microsoft.Azure.Storage.Blob 从容器中获取 blob [关闭]
【发布时间】:2022-08-16 19:28:14
【问题描述】:

我有一些代码运行了很长时间,但它停止了工作。我正在尝试将图像添加到存储帐户,并且添加文件效果很好。但是当我尝试获取文件时,它不会返回任何内容。正如您在图像上看到的,容器中有文件。变量 blob 为空。

我正在使用 Microsoft.Azure.Storage.Blob,版本=11.1.4.0

var storageAccount = CloudStorageAccount.Parse(StorageConnection);
Client = storageAccount.CreateCloudBlobClient();
Container = Client.GetContainerReference(\"files\");

var dir = Container.GetDirectoryReference(containerName);
Container.FetchAttributes();

var blobs = dir.ListBlobs().ToList();

标签: c# azure azure-storage-account


【解决方案1】:

这是一个区分大小写的事情。我在代码中使用大写调用的文件夹,而在 blob 中使用小写。

【讨论】:

  • 也许您可以为遇到此问题的其他人进一步详细说明答案。
  • 当然。我会详细说明。谢谢。
猜你喜欢
  • 2021-02-03
  • 2013-07-16
  • 2020-06-25
  • 2020-09-03
  • 2020-09-05
  • 1970-01-01
  • 2012-12-04
  • 1970-01-01
  • 2021-08-19
相关资源
最近更新 更多