Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Web Design (WordPress, Joomla, etc.) help with html or code to trigger download of wmv file – ie… download not stream

  • help with html or code to trigger download of wmv file – ie… download not stream

    Posted by Wayne Grauel on September 29, 2005 at 10:26 pm

    Hi, I have wmv files in two formats, 100kb and 256 kb.
    I want to have the 100 kb files stream but i want the 256 kb streams for download only.

    Can i control this without the client or viewer having to right click the file… in other words..
    they click and it triggers a download to a folder in their computer, basically the same thing as save file as, but without the right click requirement… basically make it dummy proof!

    any pointers to articles on the subject appreciated

    Thanks
    Wayne

    Curtis Thompson replied 20 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Curtis Thompson

    September 29, 2005 at 10:30 pm

    hello…

    you can use just about any scripting language for this – here’s a php example:

    https://us2.php.net/manual/en/function.header.php

    (scroll down a little ways)

    basically what you are doing in any of the languages is making a page and setting the content type header to your type of file (or just plain binary if you want to ensure the browser won’t open it automatically)…then you are streaming the file under that content type and the browser takes that and says to the user “what do you want to do with this?”…

    then this just becomes a scripted page and you just link to that like a normal page and you’ll get the desired result. this is about the only way you can do it, but again, you can do it in just about any web scripting language (php, perl, asp, jsp, etc.)…

    hope that helps!

    sitruc

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy