|
Posted by nospam on 11/17/07 17:58
"J.O. Aho" <user@example.net> wrote in message
news:5q7bopFum4trU1@mid.individual.net...
> nospam wrote:
>> Hello,
>>
>> I want to create a hyperlink to let users download MP3's when they click.
>> The default behavior is to play. I know they can right-click and save
>> as,
>> but I don't want to have to tell them that. I also have a MP3 player
>> already
>> playing on the page.
>
> You can do this without a bit of "hacking", and there are better and worse
> ways to do this.
>
> 1. You can use a script that sends the file in question, first it sends a
> false header that tells that the file isn't a mp3, this has the advantage
> of
> that the file don't have to be renamed.
>
> 2. Archive the file with gzip, as a browser that knows a bit about
> standard
> (of course the user settings applies here too) would unarchive the file.
>
> 3. Change the file extension.
>
> 4. Modify the servers mime types (has the disadvantage that all mp3 would
> become downloadable only)
>
>
>> I don't want to do FTP and expose user/passwords, etc.
>
> Switching protocol won't change how a browser will behave.
>
> --
>
> //Aho
Thanks for all of the replies. I am interested in using the script
as Aho mentioned. Duh, I sort of understand what you are saying,
but need to clarify.
This would be a server side script - like cgi?
or client side - like javascript?
Thanks,
bruce
[Back to original message]
|