Search code examples
azureazure-storageazure-blob-storage

How to download the Azure blob content with the same name of File


I have an Azure storage account where I have created a folder to upload & download a file in it.I am also performing the rename operation on it e.g when I perform rename operation and upload the file into the blob all Blob metadata get updated successfully.

Please suggest the changes.


Solution

  • How to download the Azure blob content with the same name of File

    As Gaurav Mantri said that you could specify the ContentDisposition property for your blob. Use the Azure Storage Explorer, you could quick set the ContentDisposition property as follows:

    enter image description here

    But when I downloading the image, the ContentDisposition seems not working at all. Then I found a similar issue, you need to set the DefaultServiceVersion for your blob storage service. And you need to write your code and set the DefaultServiceVersion, more details you could refer to here and choose your development language.

    Test:

    enter image description here

    Additionally, if you upload/download your blob files by programming, you could refer to issue1 and issue2.