首页 新闻 会员 周边 捐助

做一个wifi文件共享的页面电脑能下载手机不能下载

0
[已关闭问题] 关闭于 2012-02-10 18:49

Response.ClearContent();
string fPath = Path.Combine(path, filename);
FileStream fFileStream = new FileStream(fPath, FileMode.Open, FileAccess.Read);
long fFileSize = fFileStream.Length;
Context.Response.ContentType = "application/octet-stream";
Context.Response.AddHeader("Content-Disposition", "attachment; filename=\"" + HttpUtility.UrlEncode(Path.GetFileName(fPath), System.Text.Encoding.UTF8) + "\"");
Context.Response.AddHeader("Content-Length", fFileSize.ToString());

Server.Transfer ("./上传空间/" + filename);

 

手机下载文件后为KB.电脑下载正常

iia的主页 iia | 初学一级 | 园豆:6
提问于:2012-02-08 12:07
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册