Download .mov file from a link

Posted on 2009-02-12
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 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/" style="text-decoration:underline; color:blue" >here</a> (10.9 MB).</td>
Question by:techpr0

    Expert Comment

    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

    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

    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

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
    Great sound, comfort and fit, excellent build quality, versatility, compatibility. These are just some of the many reasons for choosing a headset from Sennheiser.
    This video will give a brief orientation and organization of Logic Pro X, and how to access different work spaces quickly with keyboard shortcuts.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    759 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now