1
votes

The requirement is to provide a friendly file name during pdf download, to our customers with whom we have shared the azure blob download urls(blobs without SAS token).I am working on this requirement using azure emulator in my local set up. I have set the content disposition property during upload of the file and am able to see the same in the blob properties(using storage explorer) after upload but it isn't returned in the response during download. Is this the expected behaviour?

I have already tried the following suggestion:

  • set the DefaultServiceVersion of blob service before setting containerAcl--have set it to 2017-11-09..but still the x-ms-version returned in the download response header shows 2009-09-19 and there is no content disposition returned in the response. Have checked the property in powershell too using Get-AzStorageServiceProperty -ServiceType Blob -Context $ctx the defaultversion is set to 2017-11-09...

cases where content disposition works:

1.When i send x-ms-version in the request header, i am able to download the pdf with the name set in the content disposition parameter of the uploaded file.

2.While using SAS token too, the content disposition parameter is used and i am able to download the file with the desired name.

I need to get this working for anonymous request.

this is what i have as of now:(PHP):

$this->blobSvc = BlobRestProxy::createBlobService($this->connectionString);
    $serviceProperties = $this->blobSvc->getServiceProperties();               
    $serviceProperties->getValue()->setDefaultServiceVersion('2017-11-09');
    $this->blobSvc->setServiceProperties($serviceProperties->getValue());

the defaultserviceversion gets set correctly. But still x-ms-version is incorrect in the response and content disposition header isnt returned during download

1
any suggestions? - nivedita

1 Answers

0
votes

azure Emulator seems to have the above issue. With an actual azure account , content disposition for anonymous request works as expected.Thanks for all help.