Viewing Stored Images in Azure Blobs

时间:2019-04-08 12:49:46

标签: azure azure-storage-blobs

I have images that are stored in Blobs in Azure. Now I want to display them on a website. What would be the easiest way to display these images ?

3 个答案:

答案 0 :(得分:0)

Each blob has its own Url which you can retrieve from the Azure Portal or by using the Azure Storage Explorer.

You could save the Urls in your database and display them directly on your website like you would any other image Url.

If your web site requires a CDN, you could add an Azure CDN on top of your blob storage Like this.

答案 1 :(得分:0)

考虑使用SAS(共享访问签名)。它的网址很短,并且可以查看特定时期的图像。您还可以提供详细级别的权限。

https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1

答案 2 :(得分:0)

最简单的方法是将blob容器的公共访问级别更改为Blob或容器,然后您可以通过“ https://your_storage_account_name.blob.core.windows.net/your_container_name/your_image.JPG”之类的链接访问容器中的所有图像。

您可以按照以下步骤操作:

1。在azure门户中,导航到您的存储帐户->选择存储图像的容器->更改“公共访问级别”:

enter image description here

2。设置公共访问级别后,您可以使用上面提到的此链接访问您的图像。就您而言,您只需将此链接放置到您的网站即可。

enter image description here