ueditor自定义上传路径
对源码进行了修改,实现了自定义上传路径设置,配置方便简单 a、jsp页面中首先定义customJson参数,设置saveRootPath和filePathFormat var customJson = { "saveRootPath": "d:/eoms4_attaches" //绝对路径 ,"filePathFormat": "/自定义路径/{time}{rand:6}" //图片上传路径 } b、实例化editor时把customJson参数传入 var editor = UE.getEditor("upload_ue", { ...... ,serverUrl : "/ueditor/jsp/controller.jsp?customJson="+encodeURI(JSON.stringify(customJson)) });
0
540
3.22MB
2019-04-28
50