nam*_*nam 4 azure azure-storage azure-blob-storage
存储digital file
in后Azure blob storage
,我想在 my (具有服务器端代码)link
中为该文件提供 a 。当用户单击该链接时,用户应该能够将该数字文件下载到他/她的计算机上。问题:如何获取存储在 Azure Blob 存储中的数字文件的属性?static website
no
url
Azure 存储中的每个 blob 都有一个以下格式的 URL:
https://account.blob.core.windows.net/container/blob
Run Code Online (Sandbox Code Playgroud)
在哪里:
account
是您的存储帐户的名称,container
是您的 Blob 容器的名称and
blob` 是您的 Blob 的名称。
现在您的要求是应提示用户直接下载文件而不使用任何服务器端代码,以下是您需要执行的其他操作:
Blob
(推荐)或Public
。如果将 ACL 设置为Private
,那么您将需要 aShared Access Signature (SAS)
并且需要一些服务器端代码。content-type
Blob 的 属性设置为application/octet-stream
(Azure 存储中任何 Blob 的默认内容类型),或者将该content-disposition
属性设置为attachment; filename="your file name"
来强制下载文件,而不是仅在浏览器中显示它。推荐的方法是使用content-disposition
属性。 归档时间: |
|
查看次数: |
10692 次 |
最近记录: |