Force PNG to download instead of opening in browser with IIS -
I need to create a subdirectory of images to download all PNG instead of opening in the browser window. I am using IIS for the web server.
Is any PNG downloadable?
As the other poster said, as I For response, you must add an HTTP content-dispensation header with the value of the attachment.
IIS6
- Select the directory with PNG files in the IIS Manager and click Open Properties dialog
- Click the HTTP Header tab.
- In the Custom HTTP Header section, click Add.
- Enter "attachment" in the "Custom-header value field" in the "Custom-header names" field that appears in a dialog.
- IIS ( Iisreset may need to be restarted
for IIS7:
- Select the directory with PNG files in the IIS Manager and select the FEATURES VEOO .
- Double-click the HTTP Response Headers item and then choose the option of the add option in the menu on the right. In the "Name" field Enter "content-type". In the "Value" field, enter "Attachments".
- You may have to restart iisreset)
gt; ; / CustomHeaders & gt; & lt; / httpProtocol & gt; & lt; /system.webServer> & lt; / Configuration & gt;
It should implement the PNG service from that directory downloadable.
Comments
Post a Comment