locked
Adding Video Download Link to Website RRS feed

  • Question

  • Hi everyone, I am fairly new to programming and web development as a whole but I have been using Expression Web for a while to develop very basic sites while I get used to it. I am using Expression Web 3 and Expression Encoder and I am now looking to add some video to a site and put that same video up for download.
    I have discovered through the GUI how to add a video in and size it and everything but I am having problems creating a Download Link for users to download my video. I have created the link and if I just create a simple hyperlink to the file in my website then the video will just play when they click on the link. I want to have the video play but have the ability to click the link and not play but start the download. If I have a wmv file on the site I don't want it to start Windows Media Player on the client's computer but instead as where they want to save it too. I have searched everywhere online but they all just talk about some PHP code that does this but not how or where to enter it or anything.

    I would love for a simple way to do this from the GUI as I am much more comfortable adding things that way but if you gave a good description of the code entry I am almost positive that I can get that too. Also, I have been doing lots of HTML pages and have only recently started using .aspx and other types to get the hang of everything so if its capable of being in HTML that is much easier on me.

    Thanks in Advance,
    Thomas
    Monday, March 8, 2010 10:51 PM

All replies

  • Take a look at this on Chris's website- it may be what you are looking for.

    http://www.veign.com/code-view.php?type=web&codeid=29 


    Bookmark his site- it is full of good stuff.

    You could have a link going to a page with several choices of formats like WMV, Flash, Quicktime, silverlight and whatever you have the capabillity to encode for. On that page you could link to another page with the above application for a straight file download. This asumes you have ASP. See the site above for details. Perhaps Chris himself can chim in as to if he thinks this would work for you.
    • Edited by surferbob Tuesday, March 9, 2010 12:05 AM
    Monday, March 8, 2010 11:57 PM
  • That'll do it but I wouldn't use ASP anymore.  I would go with PHP or ASP.NET. 

    If you're on an Apache server you can do this with a couple lines of code in an htaccess file:
    AddType application/octet-stream .mpg
    AddType application/octet-stream .wmv

    Another option is just zipping the file up and providing a download through a link to the zip file.

    --
    Chris Hanscom - Microsoft MVP
    On Facebook | On Twitter | Resource Center | Veign's Blog | Web Development Help

    Get a Complete Website Analysis by Veign
    Tuesday, March 9, 2010 12:04 AM
  • Chris,

    I have yet to get into ASP.net yet so I tend to confuse the old and new if I dont catch myself. Shame on me to not make that distinction. I like your other solution better. Since I have a few sites on apache's I may try it one of these days if the need comes up.

    Is there a canned way to do this with ASP.NET?
    Tuesday, March 9, 2010 12:10 AM
  • If you're on an Apache server check out all the cool things you can do with an htaccess file.   htaccess files can be very powerful and a quick search of Google will yield many tips and tricks  blog posts.

    Quickly found:
    http://www.hostingmanual.net/other/htfun.shtml

    Its a start.

    I don't know ASP.NET - only know enough to read it and troubleshoot problems. 

    Here's a site explaining how:
    http://www.dailycoding.com/Posts/how_to_force_a_file_to_download_in_aspnet.aspx

    --
    Chris Hanscom - Microsoft MVP
    On Facebook | On Twitter | Resource Center | Veign's Blog | Web Development Help

    Get a Complete Website Analysis by Veign
    Tuesday, March 9, 2010 12:20 AM
  • I've zipped a few slideshows for downloading and it seems to work well, there are three on the bottom of this page where I also offer a Youtube link.

     
    www.justinseye.com/Vidlink.htm

    Justin.
    Tuesday, March 9, 2010 6:35 PM