HTTP文件下载
来源:互联网 发布:曼德拉效应知乎 编辑:程序博客网 时间:2024/06/17 15:58
FileInfo fi = new FileInfo(FilePath); HttpResponse contextResponse = System.Web.HttpContext.Current.Response; contextResponse.Clear(); contextResponse.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode("FileName", System.Text.Encoding.UTF8)); contextResponse.AddHeader("Content-Length",fi.Length.ToString()); contextResponse.ContentType = "application/octet-stream"; contextResponse.Filter.Close(); contextResponse.WriteFile(fi.FullName); contextResponse.End(); contextResponse.Flush();
0 0
- http文件下载
- http下载文件
- 下载HTTP文件
- 下载http文件
- HTTP文件下载
- iphone http下载文件
- Struts HTTP 文件下载
- 使用Http下载文件
- http文件下载
- tomcat http 文件下载
- http文件资源下载
- C# HTTP下载文件
- http下载文件
- Http服务器下载文件
- C++ 下载文件 HTTP
- HTTP文件下载
- 使用http下载文件
- http文件下载
- [LeetCode] Integer to Roman
- 检测到在集成的托管管道模式下不适用的ASP.NET设置的解决方法(转)
- 获取DATETIEM控件的界面日期
- 使用maven + eclipse 建置spark基礎環境
- SVN switch 用法详解
- HTTP文件下载
- C/C++求职宝典21个重点笔记(常考笔试面试点)
- 对字段值按字符拆分多行方法
- jquery实现鼠标向下滚动右侧才出现返回顶部链接
- Linux下vsftpd的简单应用(一)
- jquery ajax请求成功,返回了数据,但是不进success的问题
- Linux环境下 使用JXL生成Excel时发生java.lang.ArrayIndexOutOfBoundsException
- GD生成缩略图函数
- sicily 1063. Who's the Boss