【问题标题】:How to retrieve thumbnail url from Azure table?如何从 Azure 表中检索缩略图 url?
【发布时间】:2011-04-14 06:30:12
【问题描述】:

如何使用 LINQ 查询从 Azure 表中检索缩略图 url?

【问题讨论】:

  • 您能否发布有关如何将缩略图上传到 Azure 的代码?理论上,如果您使用 SDK 中的存储客户端库,您只需向任何 CloudBlob 实例的 Uri 属性询问 Blob 的 URL。

标签: windows linq azure azure-storage


【解决方案1】:

取决于您要完成的工作。如果您已经生成了缩略图,则可以从容器中访问它。只需使用 DownloadByteArray。

var client = this.account.CreateCloudBlobClient();
client.RetryPolicy = RetryPolicies.Retry(3, TimeSpan.FromSeconds(5));
var container = client.GetContainerReference("containerName");
CloudBlob blob = this.container.GetBlobReference("id");
byte[] bytes = blob.DownloadByteArray();

如果您想保护 blob 的 uri,您还可以分配 SharedAccessPolicy。如果您想了解更多有关它的信息,您可以下载具有这种情况的code for our book。我们正在努力在下个月将其升级到 SDK 1.4。

【讨论】:

    猜你喜欢
    • 2011-04-14
    • 2015-03-04
    • 2015-03-25
    • 2012-06-27
    • 1970-01-01
    • 2012-06-02
    • 2014-05-02
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多