ios - Azure Blob 存储图像 URL? iOS

标签 ios azure-blob-storage

我正在尝试检索容器中 blob 项的 URL。使用 Azure 的 instructions我已成功上传图像并将图像作为数据检索,但这在我的情况下并不理想。

在 Azure 存储资源管理器中,容器中的每个 blob 项实际上都有一个 url,但我只是想不出如何在代码中获取它。有人能给我指出正确的方向吗

最佳答案

In Azure Storage Explorer there is in fact a url for each blob item in a container but I simply can't figure out how to get it in code.

其实我不是很清楚你想要的是列出blob url还是获取blob item。对于他们两个,您可以使用 Azure Storage Client Library for iOS实现。

所以,如果你想 get the blob url 在容器中,您可以使用辅助方法在每次返回延续标记时递归调用列表 blob 方法。

对于 blob,基本 URI 包括帐户名称、容器名称和 blob 名称:

https://myaccount.blob.core.windows.net/mycontainer/myblob  

例如:

https://storagename.blob.core.windows.net/container/a/b/c.txt

如果你愿意 get the blob item 在容器中,您可以将 blob 下载到 NSString 对象。

更详细的描述和代码,你可以阅读这个article .

关于ios - Azure Blob 存储图像 URL? iOS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48551916/

相关文章:

ios - 如何在 iOS 上实现方框或高斯模糊

ios - 在没有团队帐户的情况下在 Xcode 中开发同一个应用程序

ios - 设备旋转时调整 inset UITextView 的大小

azure - 如何列出虚拟目录中不带前缀的 blob?

iphone - 鉴于多任务处理,我如何在 iOS 中处理其他音频播放?

iphone - 在多台计算机上为 iOS 开发,在单个设备上测试,建议?

azure - PUT 上 SAS blob url 而不指定 x-ms-blob-type header ?

c# - 将 png 文件上传到 Azure Blob 存储会失去透明度

azure - 使用 Azure 数据工厂将本地文件系统文件复制到 blob 时如何跳过现有文件

azure - 在 Azure SAS 下允许多个 IP