Using content-disposition to download a remote file?

  • Thread starter Thread starter Bob Jones
  • Start date Start date
B

Bob Jones

I am using ASP.NET 2.0 w/ c#. I have an Http handler that intercepts
any request labeled .file. I am trying to have this handler serve up a
file from a remote location (public) and I do not want to have read
the file from the remote server first then stream it through my server
to the client.

What I am looking to do is make an HttpHandler tell the browser client
to start downloading a file from a remote location so the bandwidth
used is from the remote server and not my web server.

I have been playing around with content-disposition to make this
happen but it seems that you cannot tell the browser to use a remote
http location to get the file.

Can anyone direct me to hwo I can accomplish this?
 
content-dispostion is used to tell the browser what to do with the response
payload. if you want the browser to get a request to another server, send a
redirect.

-- bruce (sqlwork.com)
 
content-dispostion is used to tell the browser what to do with the response
payload. if you want the browser to get a request to another server, send a
redirect.

-- bruce (sqlwork.com)








- Show quoted text -

That would make sense then. However, I do not want to redirect the
response away from the page I am on. I am trying to make it act like
the user clicked a hyperlink on the page that points directly to the
file on the other server. Maybe there is something else I can do in
order to get the behavior I am looking for?
 
Back
Top