When attempting to download a PDF file to a browser directly from Azure File Storage I get this error:
<Error>
<Code>ConditionHeadersNotSupported</Code>
<Message>
Condition headers are not supported. RequestId:a84ee68e- 001a-001b-4223-bff5e7000000 Time:2017-04-27T06:57:22.2002199Z
</Message>
</Error>
Edge: Blank page or blank page with frozen loading indicator.
FireFox: Second time, shows dialog to download file.
Chrome: Blank page or When PDF Documents “Open PDF files in default PDF viewer application” setting is checked, shows dialog to download file.
IE: Shows dialog to download file.
Safari: Displays PDF.
The behavior can be seen here:
https://peachstatepca.file.core.windows.net/content/newsletters/PresseApril2017.pdf?sv=2016-05-31&sr=f&sig=rkQEmY6IWXZqcgvhmm00gLQ%2FCZEq6nsH95S3aP9T72A%3D&se=2017-05-01T11:46:18Z&sp=r
We were also facing this issue and the easiest way, till Azure File Team implements the suggestion given in the Azure Feedback forum, a workaround is to append extra parameter at the end of URL. So, for the above URL -- https://peachstatepca.file.core.windows.net/content/newsletters/PresseApril2017.pdf?sv=2016-05-31&sr=f&sig=rkQEmY6IWXZqcgvhmm00gLQ%2FCZEq6nsH95S3aP9T72A%3D&se=2017-05-01T11:46:18Z&sp=r&xyz=timestamp of client
This will ensure browser is not caching and hence conditional headers will not be added
Azure File storage doesn't support Conditional Headers at this time.
A workaround is to use the CacheControl
property and set it to no-cache, no-store, must-revalidate
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With