download links

liunx

Guest
How does one create a Download <!--more--> link to an mp3 file located on the same site, such that the Download <!--more--> would start automatically?<!--content-->You do not have any control over how the browser treats links. If the client knows what an mp3 is, it will go play it. If it doesn't, it will ask the user what he wants to do about it.<br />
<br />
You especially cannot do anything like that automatically, as that would violate security protocols.<!--content-->Theoretically you could trigger Download <!--more--> of eg an mp3 by sending it with eg a .zip mimetype. However in reality this won't work, since IE is broken and compleatly ignore the mimetype sent from the webserver.<!--content-->How do "real" sites do it - links that start a software Download <!--more-->, for example?<!--content-->With server-side code.<!--content-->they simply upload to the server the file then have a link to something like<br />
<br />
<!-- w --><a class="postlink" href="http://www.yoursite.com/music/ec212.mp3">www.yoursite.com/music/ec212.mp3</a><!-- w --><br />
<br />
<br />
Just like that..<br />
<br />
<br />
Also see the post called "Download <!--more--> Link"<br />
<br />
<br />
esher2292<!--content-->
 
Back
Top