I have a folder named Test. I have some .xls files and .txt , .doc files in it.
In the html I have
<p> <a href="../../Test/Stats.xls">Download excel file </a> </p>
- when I click on this link it is opening a download window (Working fine)
<p> <a href="../../Test/Stats.txt">Download Text file </a> </p>
<p> <a href="../../Test/Stats.doc">Download excel file </a> </p>
But these 2 are not working. Instead of opening a download window they are going to that .doc file link and saying that the page cannot be found.
why the download window is coming for .xls and not for .do or .doc? How can I fix this??
You need to configure your server’s MIME types, otherwise either the file will not be served up (and you’ll get a 404) or the browser will not know how to handle the type of file.
See this article for more information.