[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


Download .mov file from a link

Posted on 2009-02-12
Medium Priority
Last Modified: 2012-08-14
I have this streaming video that works awesome but the customer also wants a link that will allow the user to download the video to view in their default player. I thought I could simply create a link to a video file where the user will be prompted to open or save the file but it looks like I was wrong. What I have, after a long wait, just opens up a blank page. I've even tried it with an .mpg instead of .mov with the same result. I've even attempted to acess it directly by http://www.site.com/video/movie_hinted.mov but it still just opens up a blank white page. What am I doing wrong? How can I make this work? Here's what I have so far.

<td colspan="3" align="center" valign="middle">Problems viewing video? Download <a href="video/movie_hinted.mov" style="text-decoration:underline; color:blue" >here</a> (10.9 MB).</td>
Question by:techpr0
  • 2

Expert Comment

ID: 23623539
Have you modified the permissions of the file and also the folder it is contained it? They should be set to 755 for this (I think). That's the UNIX style permissions, not too sure about Windows/IIS permissions.

To change those from a command line in a UNIX-Based system (UNIX, BSD, Mac, Linux etc etc) you would need to execute the following commands from a user shell with permissions to edit the following folders/files:

cd /dir/of/files (Where /dir/of/files is the directory where the FOLDER containing the file is located)
chmod -R 755 nameofdir (Where nameofdir is the name of the folder containing the file to be downloaded)
cd nameofdir (Where nameofdir is the name of the folder containing the file to be downloaded)
chmod 755 nameofmovie (Where name of movie is the name of the movie that is to be downloadable)

Doing this will change the permissions on the folder AND file, and then again on the file (Just for good measure =P)

Hope this helps somewhat

Expert Comment

ID: 23623569
NB: Those would need to be run from the web server on which the files are stored. Alternatively, if you do not have shell access, you can most likely change those permissions using your FTP client.
LVL 18

Accepted Solution

Morcalavin earned 2000 total points
ID: 23623572
You have a few options.

When the browser requests a page through normal means, the server tells the browser what type of file it is.  Usually browsers try to handle media content such as movies with plugins.

You can use a server side script to force the header content-disposition header to something that needs to be downloaded.  If you have php available, a couple of examples are listed here:

The only other option I can think of is either have the user right click->save as, or force the server to send that particular extension with a download mime type.
LVL 22

Expert Comment

ID: 23626791
Provide a separate link to your mov file in zip format -- does mean duplication though.

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question