导航:首页 > 编程语言 > js调用迅雷

js调用迅雷

发布时间:2024-11-07 17:42:59

⑴ 如果调用网页JS代码,实现迅雷下载文件名全自动重命名~

download.aspx
string fileName = "";//客户端保存的文件名
string filePath = Server.MapPath("");//路径

FileInfo fileInfo = new FileInfo(filePath);
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.AddHeader("Content-Disposition", "attachment;filename=" + fileName);
Response.AddHeader("Content-Length", fileInfo.Length.ToString());
Response.AddHeader("Content-Transfer-Encoding", "binary");
Response.ContentType = "application/octet-stream";
Response.ContentEncoding = System.Text.Encoding.GetEncoding("gb2312");
Response.WriteFile(fileInfo.FullName);
Response.Flush();
Response.End();

阅读全文

与js调用迅雷相关的资料

热点内容
关于科技产品需要哪些数据 浏览:623
linux命令行修改文件内容 浏览:526
java通信框架有哪些 浏览:331
哪里看美国报纸app 浏览:753
excel打开同一个文件出现两个窗口 浏览:318
手机版用word做文件怎么换行 浏览:822
应用程序无法正常启动0xc0000013 浏览:761
华为鸿蒙主题在哪个文件夹 浏览:683
什么app是扔地雷 浏览:497
游戏策划要学什么编程语言 浏览:600
解压后的文件哪个是你安装包 浏览:540
g2文件是什么 浏览:782
python中修改文件 浏览:198
win10查系统版本号 浏览:861
win10如何更改壁纸 浏览:803
怎么引用另一个表格的数据 浏览:990
杭州哪个网站便宜又好 浏览:511
linuxclibcurl 浏览:434
hadoophdfs删除文件 浏览:752
ios查看软件版本号 浏览:403

友情链接