site Search:


 
    All Forums Hot Topics Gallery






how-to block ads


 
Search Topic:
Uniqs:
1987
Share Topic
Posting?
Post a:
Post a:
Links: ·How To Get Noticed ·Web Monks FAQ ·Webhosting FAQ ·Posting Code ·How To Post ·Webhosting forum
AuthorAll Replies


anonymoose

@teksavvy.com

How to make a .wmv download instead of stream?

i want to point my friends to a video clip but want them to get the download window instead of streaming it in the browser. i read that you need to add this line to the .htaccess file to do it:

AddType application/octet-stream wmv

but im not sure how or where to put that line.

this is how my .htaccess file looks now

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
 
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName mydomain.com
 


anonymoose

@teksavvy.com

bump

please help



anonymoose

@teksavvy.com

reply to anonymoose
anyone?



johnnyboyct

join:2003-06-11
New Britain, CT

reply to anonymoose
You could do something like this, I suck at htaccess :P

»elouai.com/force-download.php



yock
TFTC
Premium
join:2000-11-21
Miamisburg, OH
kudos:3

reply to anonymoose
Right click -> Save As...

???



DC DSL
There's a reason I'm Command.
Premium
join:2000-07-30
Washington, DC
kudos:2
Reviews:
·Covad Communicat..
·Verizon Online DSL

reply to anonymoose
I don't use .htaccess handle things like forcing downloads by adding/manipulating the headers and response in server-side code:

protected void Page_Load(object sender, EventArgs e)
{
  Response.Clear();
  Response.AddHeader("content-disposition", "attachment;filename=mymovie.wmv");
  
  Response.ContentType = "application/octet-stream";
  Response.WriteFile(Server.MapPath(@"~/somefolder/mymovie.wmv"));
  
  Response.End();
}
 

If you're not using ASP.NET, surely PHP has a similar capability.

--
There is no giant fur-bearing trout.


johnnyboyct

join:2003-06-11
New Britain, CT
Reviews:
·Comcast

reply to anonymoose

header("Content-type: video/x-ms-wmv;");
header("Content-Disposition: filename=file.wmv");
header("Pragma: no-cache");
header("Expires: 0");
 
something like this

--
Connecticut Web Design and Development

Saturday, 02-Jun 17:34:46 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online © 1999-2012 dslreports.com.
Most commented news this week
Hot Topics