user1997592
user1997592

Reputation:

How can I set `Content-Disposition : attachment` header in azure blob storage?

I want this header to be there on every file served from azure blob storage. Their documentation says it can be set, but they don't explain how. Even the support engineers at Microsoft are not aware of this. Can someone help me this. Screenshots would be great .

I am using paperclip gem to handle the file creation with azure-sdk

Upvotes: 3

Views: 3379

Answers (1)

Ivan Glasenberg
Ivan Glasenberg

Reputation: 29950

Updated 0707:

If you visit the blob via its public url from browser, the default version of blob rest api is 2009-09-19.

If you want to see the blob properties in the response, you should specify the version of blob rest api to 2019-12-12.

Here is a test with postman, and specify the version to 2019-12-12:

enter image description here


Original answer:

You can set this property via Azure Storage Explorer, please follow this article to download and learn how to use it.

Here is a screenshot of how to set it via Azure Storage Explorer(right click on the blob -> select properties, then you can set it):

enter image description here

If you don't want to download this tool, you can nav to azure portal -> the storage account -> and on the left blade, click on "Storage Explorer(preview)" -> then you can set the property:

enter image description here

Upvotes: 0

Related Questions