This topic is locked

Download of files

1/9/2008 3:37:15 AM
PHPRunner General questions
T
tcgass author

Hi
I've a database with audio and videofiles that can be downloaded. Is there anything I can do to prevent the browser opening linked files instead of presenting the download dialogue? Right now I've added a message telling the user "right-click to download" - could that also be done with an alt-text over the displayed text in the hyperlink field?
Thomas

F
frocco 1/11/2008

It sounds like a MIME issue.

Create php file for each download and add something like: (depending on the file)

header('Content-disposition: attachment; filename=movie.mpg');

header('Content-type: video/mpeg');
HTH

Frank

Hi

I've a database with audio and videofiles that can be downloaded. Is there anything I can do to prevent the browser opening linked files instead of presenting the download dialogue? Right now I've added a message telling the user "right-click to download" - could that also be done with an alt-text over the displayed text in the hyperlink field?
Thomas