Azure Storage API ContentDisposition
Can you please check the DefaultServiceVersion
for your storage account? For Content-Disposition
to work, I believe the DefaultServiceVersion
should be 2013-08-15
.
To get DefaultServiceVersion
:
var cloudStorageAccount = new CloudStorageAccount(new StorageCredentials("accountname", "accountkey"), false); var serviceProperties = cloudStorageAccount.CreateCloudBlobClient().GetServiceProperties(); var serviceVersion = serviceProperties.DefaultServiceVersion;
To set DefaultServiceVersion
:
var cloudStorageAccount = new CloudStorageAccount(new StorageCredentials("accountname", "accountkey"), false); var serviceProperties = cloudStorageAccount.CreateCloudBlobClient().GetServiceProperties(); serviceProperties.DefaultServiceVersion = "2013-08-15"; cloudStorageAccount.CreateCloudBlobClient().SetServiceProperties(serviceProperties);
Once you set DefaultServiceVersion
, it should work.