You tell them to right click, save as, on the link.
Or they can click it and stream.
Even if you coded some complex setup checking their preferences, setting cookies, doing forms, storing the prefs in a database... whatever the heck you want, you'd STILL, to be able to act on those prefs, make a way to force them to download the file.
the point is... you can't do that, from what I'm hearing. Which, yeah, isn't too great, but it's what you gotta work with.
that's the easiest option but the website's in Flash and when you right click all you get is the flash options, no save target as. The only way I can think of the get around it is to have the link open up a pop up window with the html link in it, users can then right click to download the link.
This would require building a seperate html file for each song to downlaod, unless there was a way to have one html page for the pop up and then pass a variable from the flash link into it. My knowledge of HTML is pretty basic, any tips?
The easiest way to do it is to compress the file, as I've already mentioned. Almost all users have their browsers set up to download a compressed file, rather than opening it with a plugin. Note that this won't work for image files.
It's funny now that I think about it; there are so many efforts and semi-workable ways to do the exact opposite.
You can force someone to stream, or come darn close, but you don't seem to be able to force a download. Interesting.
It's impossible to force a user to handle the data you supply in any given way. Once the user downloads the data, it's in their hands (and those of their system).
The system is what we depend upon when trying to get the user to download or stream something rather than the alternative. We just have to hope it adheres to the norms. However, there will always be systems that don't, and users who would rather take personal control. Therefore, this should never be relied upon.
If it was possible to force the download of things the internet would not exsist, because computors would not be able to run. this because of people forcing the download of viruses. just thought id get you thinking on that
I think you missed the point of this.
Firstly, downloading malicious code is quite harmless. I have a few on my machine I've been studying, actually. Only if the code is run does it pose a threat (which is why I use qemu ). The issue here was not forcing a download, but forcing the browser to perform a specific action on the data after the download, such as opening it in a media player -- or, in this case, not opening it in a media player.
ow oops, my mistake. Sorry about that but know in that case that is inpossible. I have never saw it done before and don't think i will for a long time
Windows server side solution
This fellow seems to have found a solution that works with all browsers (but this is only if you are being hosted on a Windows Server and can make/request the change).
See [for explanation]:
See [for an example of this in action, simply click the link to download this movie]:http://www.pmcmovies.com/
He hasn't, and it'll work with any server; only the instructions are for IIS.
Originally Posted by benau
The Content-Disposition header - which originates from MIME not HTTP, but is quite widely implemented by browsers, nevertheless - is well-known, but not foolproof. Most notably, older IE browsers fail to react to it properly, though they aren't the sole offenders.
The previous comments still stand.