Welcome to WebmasterWorld Guest from 54.227.1.130

Forum Moderators: incrediBILL

Message Too Old, No Replies

Force download

with out using ASP.

     

Morrison

12:12 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



is there anyway to force download not using ASP (or any other server side script)?

thanks.

joshie76

1:27 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Force download?

How do you mean?

Morrison

1:55 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



i mean when i use this tag:


<a href="mymovie.avi">mymovie.avi</a>

it won't open the movie using explorer. instead i want the download dialog box to pop.

choster

2:00 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Wouldn't that depend on the user's platform? If I have my browser set to automatically "run" AVI instead of prompting me to run or save?

The tag you're using is the correct one. If you wanted to embed it to display within a web page itself, you'd use

<object>
.

joshie76

2:06 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



We've looked into this recently and our research led us to the conclusion that we can't control this; it's a client configuration issue.

i.e. if, under Windows Explorer > Tools > Folder Options, the file type is marked as 'Browse In Same Window' then it's going to do just that. We further found myriad reasons that different file-types behave the way they do... it's a nightmare!

We just gave up in the end and let the client do what ever it was going to do...

Morrison

2:10 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



Ok. let me be more clear about my problem.

i have short DivX movies (3MB each) on my site that i want the users to be able to see.

opening the movie using explorer cuase alot of trubles and i don't know anyway to stream DivX video.

there is a way in ASP that i can force the download box to apear and then the user can save and view the file, but i don't want (can't) to use it.

what is the best way to link to those DivX files?

choster

2:38 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The code is
<a href="mymovie.avi">mymovie.avi</a>

Maybe your ASP technique works because it changes the HTTP headers? For instance, instead of the web server delivering the movies as the default MIME type for the extension (say "video/x-msvideo") it tells the browser it is instead delivering a DivX video ("video/x-application-divx"?) or something unknown ("application/octet-stream"). That's purely a guess; if you have access to your server's configuration perhaps you could try "dumbing it down" by fiddling with the MIME.

[edited by: choster at 2:39 pm (utc) on June 17, 2003]

SethCall

2:39 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



yes truthfully, the only thing I would think that would work would be to ask them to right click on the link and do "save target as".

Because Joshie is right, clients can set up how they want the left click to behave regardless, so theres not certains in what will happen.

BlobFisk

2:59 pm on Jun 17, 2003 (gmt 0)

WebmasterWorld Senior Member blobfisk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



How about zipping the movie up and linking to the zip file? Most (all?) browsers will save a zip archive rather than try to open it...

Morrison

3:05 pm on Jun 17, 2003 (gmt 0)

10+ Year Member



so there is no "right" way to do it... :(

i guess i just have to write to the users "right click..." or use the zip option, it a nice option but can be to complicated to regular users.

thanks for the help.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month