Hi Guys,
I'm working on a ASP.NET website that allows users to download files.
Previously the files were stored on the same server as the website so we could do:
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\"");
Response.AddHeader("Content-Length", response.ContentLength.ToString());
Response.ContentType = "application/octet-stream";
Response.TransmitFile(path);
Response.End();
However, now some of the files are stored on a seperate server. I can verify that the files exist using
WebRequest request = WebRequest.Create(absolute-url);
WebResponse response = request.GetResponse();
But how can I facilitate the transfer as TransmitFile requires a virtual path not a url?
I need the users to be able to choose where to Save the file as with a normal web download
What's the best way to do this?