在找到fckconfig.js文件的299号左右,将代码修改成下面的,可以修复添加链接时无法上传附件的BUG
FCKConfig.LinkUpload = true ; FCKConfig.LinkUploadURL = FCKConfig.BasePath + 'filemanager/connectors/' + _QuickUploadLanguage + '/upload.' + _QuickUploadExtension + '?Type=File';
将CONFIG.ASCX的代码做如下修改
HtmlExtensions = new string[] { "html", "htm", "xml", "xsd", "txt", "js" };
TypeConfig["File"].AllowedExtensions = new string[] { "7z", "aiff", "asf", "avi", "bmp", "csv", "doc", "fla", "flv", "gif", "gz", "gzip", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "ods", "odt", "pdf", "png", "ppt", "pxd", "qt", "ram", "rar", "rm", "rmi", "rmvb", "rtf", "sdc", "sitd", "swf", "sxc", "sxw", "tar", "tgz", "tif", "tiff", "txt", "vsd", "wav", "wma", "wmv", "xls", "xml", "zip" }; TypeConfig["File"].DeniedExtensions = new string[] { }; TypeConfig["File"].FilesPath = "%UserFilesPath%"; TypeConfig["File"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%"); TypeConfig["File"].QuickUploadPath = "%UserFilesPath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/"; TypeConfig["File"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");
TypeConfig["Image"].AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" }; TypeConfig["Image"].DeniedExtensions = new string[] { }; TypeConfig["Image"].FilesPath = "%UserFilesPath%"; TypeConfig["Image"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/"); TypeConfig["Image"].QuickUploadPath = "%UserFilesPath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/"; TypeConfig["Image"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");
TypeConfig["Flash"].AllowedExtensions = new string[] { "swf", "flv" }; TypeConfig["Flash"].DeniedExtensions = new string[] { }; TypeConfig["Flash"].FilesPath = "%UserFilesPath%"; TypeConfig["Flash"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%"); TypeConfig["Flash"].QuickUploadPath = "%UserFilesPath%" + DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/"; TypeConfig["Flash"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");
TypeConfig["Media"].AllowedExtensions = new string[] { "aiff", "asf", "avi", "bmp", "fla", "flv", "gif", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "png", "qt", "ram", "rm", "rmi", "rmvb", "swf", "tif", "tiff", "wav", "wma", "wmv" }; TypeConfig["Media"].DeniedExtensions = new string[] { }; TypeConfig["Media"].FilesPath = "%UserFilesPath%"; TypeConfig["Media"].FilesAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%"); TypeConfig["Media"].QuickUploadPath = "%UserFilesPath%"; TypeConfig["Media"].QuickUploadAbsolutePath = (UserFilesAbsolutePath == "" ? "" : "%UserFilesAbsolutePath%");
即可在上传文件时,将文件按时间目录名自动归档保存到服务器上。
|