Hi. I have a problem with my website - Some download managers rename the extension file of my .msi installer to an .exe, making the installation unusable. So, I got a suggestion that I should change the "content-type parameter" of my file to "application/octet-stream" or "application/x-msi". Does anyone know how to do this and where? Because I've never seen such a thing
Internet Download Manager, it's popular so quite a few people are probably having this problem... Btw, here is come php code that I've would that supposedly does change the file content type, don I don't know how to use it: <?php // We'll be outputting a PDF header('Content-type: application/pdf'); // It will be called downloaded.pdf header('Content-Disposition: attachment; filename="downloaded.pdf"'); // The PDF source is in original.pdf readfile('original.pdf'); ?>
You should probably post the source code that is causing this problem. Without this sort of information neither I or anyone else is going to be able to help you.
How are you making available the download? 1. Through a bare link, e.g., <a href="..."> 2. Through a CGI script? Tell us more about the method you use.
I'm using a simple hyperlink, <a href="...> as you have mentioned. The hyperlink points to the .msi file found on my hosting. But I can change this to anything, CGI, PHP, it's no problem. I just need it to work.
In my opinion, you should change to a CGI script if you want to control what type of file you are serving. Look at this tutorial: Developing a CGI Script Good luck.