我正在努力实现这一目标:
用户购买文件,点击链接即可:
var filename =“SomeHighlySecureFile.mp3”; HttpWebRequest request =(HttpWebRequest)WebRequest.Create(“http://myfiles.com/download.aspx?file=”+ filename); HttpWebResponse response =(HttpWebResponse)request.GetResponse(); 流responseStream = response.GetResponseStream();
context.Response.Buffer = true; context.Response.Clear(); context.Response.AddHeader(“content-disposition”,“attachment; filename =”+ fileinfo.Name); context.Response.ContentType =“application / octet-stream”;
我不知道,接下来该怎么办?因为“WriteFile”没有提供写另一个流的选项吗?
任何人都可以告诉我如何做到这一点吗?