Jump to content

Archived

This topic is now archived and is closed to further replies.

psychomantum

getting downloads to......download

Recommended Posts

Hi,

 

I\'m fairly new to webhosting, but I just did this web site for a band and I want users to be able to download mp3s. I put the mp3s on the site, but when you click on them they try to play in windows media player (or whatever app handles it by default on your machine). In order to download the file, you have to right click and do the \"save as...\"

 

I want to bypass this so that it downloads by default. Is this an Apache configuration issue or do I just need to make a small change elsewhere?

 

Thanks.

 

P.S. I\'m using Apache 2.0.40 on RedHat 8.0

The web site in question is at http://www.tripwire.us

Share this post


Link to post
Share on other sites

i\'m honestly not sure. you could try having the link send the filename to a php page and it sends the file via header() ... overall i think you could help the situtation, but it really comes down to how the user has their browser configured — but i may be off :shock:

Share this post


Link to post
Share on other sites

You\'ll have to force it with header();

 

header(\"Content-type: application/octet-stream\");

header(\"Location: http://mysite.com/my.mp3\");

 

The reason why is that some browsers and operating systems like Windows for examples thinks that MP3 should stream. So, when you click on the URL, it wants to stream it.

 

Keep in mind, you\'ll have to create a seperate script for this and pass the URL as a variable.

Share this post


Link to post
Share on other sites

thanks for the input

 

 

How exactly do I do what you said? Or, in other words, what do I put in which file to do it?

 

Like I said, I\'m fairly new to this stuff so you kind of have to spell it out in \"dummy format\" so that I can get exactly what you are saying.

 

thanks again.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.