【发布时间】:2017-03-30 17:54:43
【问题描述】:
我将我的数据存储到 azure blob。如果容器名称已知,那么我们可以访问该容器中的所有 blob。但我需要进行一些身份验证才能访问 blob。
示例:设置一些密码以在创建 blob 时访问它。
发送密码以获取 blob 的内容。
这可能吗?
代码无需任何身份验证即可检索 blob:
for (ListBlobItem blobItem : container.listBlobs()) {
// If the item is a blob, not a virtual directory
if (blobItem instanceof CloudBlockBlob) {
// Download the text
CloudBlockBlob retrievedBlob = (CloudBlockBlob) blobItem;
act.outputText(view, retrievedBlob.downloadText());
}
}
【问题讨论】:
标签: android azure azure-blob-storage