Stupid html question...
This ought to be easy, but I can't figure it out.
I want to create a button on my site that will download a QT .mov file to the viewers' hard drive. I don't want them to have to think or know to "right click". I know it's possible, because I have used them often in my own surfing. Any help? TIA |
Jeff,
Much like any other anchor link, you would point your link to a QuickTime file. What happens when a visitor actually clicks the link, however, depends in part on the visitor's system configuration and the actual contents of the .mov file. If the visitor has the QT player and the player is configured as a browser plug-in the movie will begin to download and, if it's a streaming movie, will begin to play asap. |
Thanks, Ken. I may ask you to test them tomorrow when my server gets them up.
|
It indeed depends on what you have installed. However, you
can more or less force it to download it to send back custom headers to the browser. You can only do this if you can have some sort of scripting (ASP or PHP for example) on your server. However, you need to write a download page which "sends" the file to the browser with these special headers/ The header you need to add is (according to the official rules): ContentType = application/octet-stream However, I found out that this does not work with Internet Explorer (this browser decides it wants to be smart). You can make it work anyhow by using a non-existent content type (like bad/type). An example to add this header with ASP is: Response.ContentType = "bad/type" This needs to be near the top of your ASP. If you are using ASP I can send you an example of how to send a file through ASP. If you do use ASP/IIS you can also setup IIS to insert a special header if you put the quicktime files in a seperate directory. You do this by going to the HTTP Headers tab for that directory. Then ofcourse there is always the easy way by putting up a text on your site above the link or something that says if the user wants to download it, instead of view it online, he needs to right-click and choose save target as (depending on which browser you've got)... all in all it doesn't come easy, sorry. |
One other thing you can do is to lift code form a page that works the way you want it too.
Find a web page that pushes the file to you and grab the source code. You should be able to pull apart the code that you need to do what you want. Adam. |
Also try winzipping it...IE will automatically download a ZIP file.
|
All times are GMT -6. The time now is 09:55 AM. |
DV Info Net -- Real Names, Real People, Real Info!
1998-2024 The Digital Video Information Network