If I understand correctly, you want your users to see Open/Save As
prompt when they click on the SAS URL.
Assuming my understanding is correct, recently Windows Azure Storage had announced some enhancements. One of the enhancement there is addition of Content-Disposition
property for the blob which would allow this Open/Save As
prompt to show when a user clicks on the SAS link for the blob. With Content-Disposition
, you have 2 options:
- Set
Content-Disposition
as blob property: In this case, whenever user clicks on the SAS link, they will be prompted to save the file. But in this case, they will always be prompted so SAS link or not, user would never be able to see the document inline in the browser. You may find this link useful for this: http://msdn.microsoft.com/en-us/library/windowsazure/ee691966.aspx. - Set
Content-Disposition
as part of SAS URL: In this case, a user will only be prompted when they click on the SAS URL which containsContent-Disposition
. You may find this link useful for this: http://msdn.microsoft.com/en-us/library/windowsazure/dn140255.aspx.
So assuming you have a png file. In option 1, it will never be displayed inline in the browser, it will be downloaded on the client machine and opened in the registered image viewer on your computer. In option 2, if Content-Disposition
is set in the SAS URL, the image file will be downloaded on the client machine and opened in the registered image viewer on your computer otherwise it will be displayed directly in the browser.
If you're using .Net, Storage Client library 3.0.0.0 has support for this feature so you don't have to write wrapper around the REST API (but I think you're using PHP ... from your previous question about CORS :)).