行 31: context.Response.ContentType = "application/octet-stream";
行 32: context.Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.Name, System.Text.Encoding.UTF8));
行 33: context.Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
行 34: context.Response.WriteFile(DownloadFile.FullName);//DownloadFile.FullName保存文件名
行 35: context.Response.Flush();
|