居然发现文件名编码后长度超过155就会不能正确显示与下载,最后只好找了这样一个折中的方法,截短了
下面是那里的代码 【程序编程相关:用C++编写的基于双向链表的CPtrAr】 【推荐阅读:CSDN Blog 界面个性化指南】/// <summary> 【扩展信息:blog的魅力,解决我一个oracle的】 /// 下载附件. /// </summary> /// <param name="filename">文件名</param> /// <param name="path">文件路径</param> public static void downloadfileattachment(string filename , string path) { if (system.io.file.exists(path)) { try { filename = filename.trim();for (int i = 0 ; i < system.io.path.invalidpathchars.length ; i ++)
{ filename = filename.trim().replace(system.io.path.invalidpathchars[i].tostring() , string.empty); }filename = filename.replace(system.io.path.pathseparator.tostring() , string.empty);
... 下一页