reset password
Author Message
kknaur
Posts: 540
Posted 19:44 Oct 13, 2010 |

Is there a way to always make the download file dialog box appear, instead of it only appearing for some files, i.e. when i click on a text file it will open in the browser but if i click on a powerpoint file then it allows you to save it to your computer.  Is there a way to get it to always do the second option?

victormejia
Posts: 40
Posted 20:03 Oct 13, 2010 |

I think that depends on how the client's browser handles things.  Usually text files, and source code is displayed on the browser. If I figure anything out will let you know.

Phobe
Posts: 40
Posted 20:19 Oct 13, 2010 |

Hopefully this won't be too much of a giveaway. You need to add a header called [Content-Disposition] with parameter [attachment; filename="FILENAMEHERE"]

cysun
Posts: 2935
Posted 22:08 Oct 13, 2010 |
Phobe wrote:

Hopefully this won't be too much of a giveaway. You need to add a header called [Content-Disposition] with parameter [attachment; filename="FILENAMEHERE"]

This. And it's also in the file download example we discussed in class.