Force download menu for remote files

Posted by o-logn on Stack Overflow See other posts from Stack Overflow or by o-logn
Published on 2010-04-14T19:59:14Z Indexed on 2010/04/14 20:03 UTC
Read the original article Hit count: 180

Filed under:
|
|
|
|

Hey,

I would like users to upload links on my site. When another user clicks on the link (e.g. PDF file), then I would like the download popup to show instead of actually displaying the PDF in browser. I know I can use Response.AddHeader/Response.WriteFile to achieve this, but the WriteFile method required a virtual path. However, the links uploaded by the user will be pointing to external servers. Can I still force the download popup to show and, if so, what would be the most efficient way of doing it?

Thanks for any advice

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about download