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

  1. Select the directory with PNG files in the IIS Manager and click Open Properties dialog
  2. Click the HTTP Header tab.
  3. In the Custom HTTP Header section, click Add.
  4. Enter "attachment" in the "Custom-header value field" in the "Custom-header names" field that appears in a dialog.
  5. IIS ( Iisreset may need to be restarted

for IIS7:

  1. Select the directory with PNG files in the IIS Manager and select the FEATURES VEOO .
  2. 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".
  3. 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

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -