如何修改 blob 存储响应 header

How to modify blob storage response header

我在哪里可以更新响应 header 以将 "Content-Disposition" 包含在 blob 存储的 Azure 门户中?我只看到 meta-data 一个。

https://docs.microsoft.com/en-us/rest/api/storageservices/setting-and-retrieving-properties-and-metadata-for-blob-resources 以上是我能找到的关于设置属性和元数据的link。 Dose azure 甚至支持修改 "Content-Disposition" in header?

请在 Get Blob 找到关于这些 headers 的更多信息,并使用存储资源管理器

您也可以参考此 SO thread, Here is the steps how you can try in PS cmdlet

附加信息

"name": "@replace(outputs('GetFileContents')['headers']['Content-Disposition'],'attachment; filename=','')"

我会推荐逻辑应用;您可以使用连接器来托管公开可用的端点、连接到 Blob 存储并修改您的响应 headers.

是的,支持。只是它是一个可选的请求 Header,所以它没有在您粘贴的 link 中列出。

所以如果你想设置 Content-Disposition header,你需要使用这个 x-ms-blob-content-disposition。关于您可以在此文档中找到的详细信息:Set Blob Properties.

Does azure even support modifying "Content-Disposition" in header?

您当然可以更改 Content-Disposition header 属性 的 blob。只是 Portal UI 不允许您这样做。您可以使用任何可用的 Storage Explorer(例如 Microsoft 的 Storage Explorer)来实现相同的目的,也可以通过编程方式对其进行更改。