downloading mp3 audio

J

JoeP

I would like to give visitors to may site the ability to download mp3 audio
files. How is that done?
 
S

Steve

Place the mp3 files on your site where you want them [eg in a download
folder] and then simply create a hyperlink to the file.

Instead of opening a page like a normal hyperlink - this link will instigate
the download process for the visitor.
 
N

Nicholas Savalas - http://savalas.tv

Dear Joe,
Didi you mean download the file instead of automatically play in their
default media player? There are many ways to force a download dialog
prompt, but here is a very simple method:
----------------------------
<html>
<body>
<script>
function forcedownload(x){
myDownloadWindow =
window.open(x,'','left=10000,screenX=10000');
myDownloadWindow.document.execCommand('SaveAs','null',x);
myDownloadWindow.close();
}
</script>
<a href=javascript:forcedownload("whatever.mp3");>Download this
song</a>
</body>
</html>
 
A

Andrew Murray

You will need to zip(compress) the files, link to the zip file.

Linking to the MP3 file directly will cause it to open and play in the
user's default media player.
 
J

JoeP

Yes, we have sermons and communions online. We would like to give visitors
the ability to download these services in MP3 format. Your coding works great
using dreamweaver 8 in preview. However, when I publish it to the site, then
when I hit the link, it imediately starts to download. It does not ask me the
the question if I want to save or open? The link is pointing to a mp3 file on
the server. Do you know what the problem might be?
Rev. Joe Paradis
 
J

JoeP

What I have discovered is that the when I publish this to the site, when a
visitor presses the link, it imediately starts downloading, but to where. I
wanted to give them the capibility to save or open the file, to a location
they select.

Rev. Joe Paradis

Steve said:
Place the mp3 files on your site where you want them [eg in a download
folder] and then simply create a hyperlink to the file.

Instead of opening a page like a normal hyperlink - this link will instigate
the download process for the visitor.
--
Steve


JoeP said:
I would like to give visitors to may site the ability to download mp3 audio
files. How is that done?
 
D

dj001

I upload mixes to my website. If I put a link to the .mp3, site visitors can
download the .mp3. However, what code should I use if I want them to play
the mix immediately?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top