UEditor 1.3.6 .NET版本 图片上传配置

Ueditor编辑器确实是很是好用,可是官方的使用文档已经很是旧了,没有及时更新,为了使用Ueditor编辑器,查了几天资料终于配置成功!真不容易!编辑器

如下配置是把上传的路径放到根目录下的Upload 文件夹内,默认的路径放得太深刻了。spa

后续我会加上生成缩略图和添加水印。blog

 

UEditor 1.3.6 .NET版本图片上传配置:
1.把net文件夹下的image.ashx的顶部<%@ Assembly Src="Uploader.cs" %> 和<%@ Assembly Src="Config.cs" %> 去掉图片


2.把net文件夹下的 uploader.cs 上传文件处理方法 public  Hashtable upFile(HttpContext cxt, string pathbase, string[] filetype, int size) 的 pathbase = pathbase + "/"; 改成:pathbase = pathbase + DateTime.Now.ToString("yyyy-MM-dd") + "/";文档

3.在net文件夹下的 uploader.cs 上传文件处理方法 public  Hashtable upFile(HttpContext cxt, string pathbase, string[] filetype, int size) 的里面加上 uploadpath =uploadpath.Replace("ueditor\\net","");get

 


4. 在ueditor.config.js文件中,图片上传配置区把imagePath: URL + "net/" 改成:  imagePath: URL.replace("ueditor/","")string


 

文章来源:http://www.cnblogs.com/meishita/    到这里图片上传就修改为功了!it

下面是图片管理配置:
1.ueditor.config.js文件中,图片在线管理配置区把imageManagerPath: URL + "net/"改成:  imageManagerPath: URL.replace("ueditor/", "")图片上传


2.imageManager.ashx 中,把 DirectoryInfo info = new DirectoryInfo(context.Server.MapPath(path));改成:DirectoryInfo info = new DirectoryInfo(context.Server.MapPath(path).Replace("ueditor\\net\\", ""));table

相关文章
相关标签/搜索