简体   繁体   中英

Apache force file download on click - doesn't work on IE

I'm working on an icon conversion site where you convert .png to .ico - and then proceed to download your file - all happens within the same page. I added the following code to my .htaccess file in order to force the download of my .ico and .png files upon clicking the download link and it works very well in everything but IE:

AddType application/octet-stream .ico
AddType application/octet-stream .png

-- disclaimer, ico to png not working right now --

Here's the link to the test version: http://ci.convertico.com/index3.html

When I click the download link on the right after converting the icon - with IE - I get taken to a blank page with <h<izhxi<ahsaIDHIAD code jibberish.

How can I fix this?

Regards G.Campos

Check the Content-Disposition: attachment ... header. Add it by using mod_header(s)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM