修改ckeditor/ckfinder上传文件文件夹 路径以日期格式命名
2016-04-16 17:48
387 查看
修改/ckfinder/config.ascx文件:
string dateDir = DateTime.Today.ToString("yyyyMM/");
ResourceType type;
type = ResourceType.Add( "Files" );
type.Url = BaseUrl + "files/" + dateDir;
type.Dir = BaseDir == "" ? "" : BaseDir + "files/" + dateDir;
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "7z", "aiff", "asf", "avi", "bmp", "csv", "doc", "docx", "fla", "flv", "gif", "gz", "gzip", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "ods", "odt", "pdf", "png", "ppt", "pptx", "pxd", "qt", "ram", "rar", "rm", "rmi", "rmvb", "rtf", "sdc", "sitd", "swf", "sxc", "sxw", "tar", "tgz", "tif", "tiff", "txt", "vsd", "wav", "wma", "wmv", "xls", "xlsx", "zip" };
type.DeniedExtensions = new string[] { };
type = ResourceType.Add( "Images" );
type.Url = BaseUrl + "images/" + dateDir;
type.Dir = BaseDir == "" ? "" : BaseDir + "images/" + dateDir;
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" };
type.DeniedExtensions = new string[] { };
type = ResourceType.Add( "Flash" );
type.Url = BaseUrl + "flash/" + dateDir;
type.Dir = BaseDir == "" ? "" : BaseDir + "flash/" + dateDir;
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "swf", "flv" };
type.DeniedExtensions = new string[] { };
string dateDir = DateTime.Today.ToString("yyyyMM/");
ResourceType type;
type = ResourceType.Add( "Files" );
type.Url = BaseUrl + "files/" + dateDir;
type.Dir = BaseDir == "" ? "" : BaseDir + "files/" + dateDir;
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "7z", "aiff", "asf", "avi", "bmp", "csv", "doc", "docx", "fla", "flv", "gif", "gz", "gzip", "jpeg", "jpg", "mid", "mov", "mp3", "mp4", "mpc", "mpeg", "mpg", "ods", "odt", "pdf", "png", "ppt", "pptx", "pxd", "qt", "ram", "rar", "rm", "rmi", "rmvb", "rtf", "sdc", "sitd", "swf", "sxc", "sxw", "tar", "tgz", "tif", "tiff", "txt", "vsd", "wav", "wma", "wmv", "xls", "xlsx", "zip" };
type.DeniedExtensions = new string[] { };
type = ResourceType.Add( "Images" );
type.Url = BaseUrl + "images/" + dateDir;
type.Dir = BaseDir == "" ? "" : BaseDir + "images/" + dateDir;
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "bmp", "gif", "jpeg", "jpg", "png" };
type.DeniedExtensions = new string[] { };
type = ResourceType.Add( "Flash" );
type.Url = BaseUrl + "flash/" + dateDir;
type.Dir = BaseDir == "" ? "" : BaseDir + "flash/" + dateDir;
type.MaxSize = 0;
type.AllowedExtensions = new string[] { "swf", "flv" };
type.DeniedExtensions = new string[] { };
相关文章推荐
- OK335xS PMIC(TPS65910A3A1RSL) reset
- 强制IE浏览器或WebBrowser控件使用指定版本显示网页
- UIButton实现控制动画的开始和停止
- PhotoShop CS3 批量处理图片
- qt中如何播放声音
- 手机点击输入框,弹出输入法会盖住web的文本框问题。
- geotrellis使用(二)geotrellis-chatta-demo以及geotrellis框架数据读取方式初探
- pthread几个互斥锁和条件变量接口
- 青蛙的约会gcd
- android Mediaplayer各种属性和方法简单介绍
- Ubuntu下搭建tftp服务器最简单方法
- 每天一个linux命令(8):rm
- 线性表基本操作
- 2016.4.16
- Codeforces Gym 100543G Virus synthesis
- 线程通讯的几种方式
- 近100个linux常用命令大全
- java web 分页实现的补充
- 解析jsp的 tomcat 、resin
- 第七周学习进度条