How to provide "download video" link
I'm trying to allow users to download a video from our site but am running into issues with IE and Firefox. When I simply link to the .mov file, I am unable to get the "Save File As" popup to appear and the video simply starts running in the browser. I would like to avoid forcing the user to right click on the link. I've also tried passing the action=save variable but that no longer works. Does anyone have any suggestions?
Just a idea...probably not the best one. Place a link under the video (or where ever) link it to a .zip file of the video. I.E link = /directory/video.zip
That should enable it to download. (yes I posted a download question earlier, but figured it out)
As I said, not the greatest way...but should work at least
Its a good idea to put the file as a zip.
But I would have used a server side script like PHP / ASP. With PHP you can actually say how the file link is handled. You can force the download.
For an idea, you can refer: http://www.php-mysql-tutorial.com/up...ile-server.php
Thanks for your replies...
I appreciate both your help on this. Unfortunately, I know nothing about PHP -- that would have been a good option. The zip does do the trick -- good thinking! However, if anyone else has a method that doesn't involved having to unzip the file, I'd appreciate your thoughts as well.
Yeah, I figured the problem behind upzipping the file would be there. Um, also put a link to winzip.com? lol!
I know of other ways to get the video...but they involve browser add-ons, and third party programs.
Paste this code into a new Notepad page and save it as "download.php". Change the "whatever.mpg" to the name of the file you want downloaded:
$filename = "whatever.mpg";
header("Content-Length: " . filesize($filename));
header('Content-Disposition: attachment; filename=whatever.mpg');
Then add this wherever you want the download link to go:
<a href="download.php">Download Now!</a>
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)