最近做项目用到了fckeditor,但到配置上传路径的时候出了点问题,在网上找了找,也没有解决问题。最后自己看源码解决了。下面是一个完整的fckeditor.properties配置。
# 设置允许上传的文件类型
connector.resourceType.file.extensions.allowed = txt|rar|7z|zip
connector.resourceType.image.extensions.allowed = bmp|gif|jpeg|jpg|png
connector.resourceType.flash.extensions.allowed = swf|fla
connector.resourceType.media.extensions.allowed = mp3|wav
# 设置禁止上传的文件类型
#connector.resourceType.file.extensions.denied
#connector.resourceType.image.extensions.denied
#connector.resourceType.flash.extensions.denied
#connector.resourceType.media.extensions.denied
# 设置中类型文件的资源文件夹(上传的存放路径)
connector.resourceType.file.path = /file
connector.resourceType.image.path = /image
connector.resourceType.flash.path = /flash
connector.resourceType.media.path = /media
# Due to security issues with Apache modules, it is recommended to leave this
# setting enabled.
connector.forceSingleExtension = true
# 设置用户目录(有的说改这个属性就可以改上传目录)
connector.userFilesPath = /UserUpload
# 上传目录(如果更改上传目录的话,上面的一并要修改,保持一致)
connector.userFilesAbsolutePath = /UserUpload
# Instructs the Connector to check, if the uploaded image is really one
connector.secureImageUploads = true
# directory of the editor relative to the context root
fckeditor.basePath = /fckeditor
# height of the editor
fckeditor.height = 100%
# toolbar set of the editor
fckeditor.toolbarSet = Default
# width of the editor
fckeditor.width = 100%
# implementations
connector.impl = net.fckeditor.connector.impl.ContextConnector
#启用了一个东西,具体我也不知道是什么。
#有的上传不成功跟没有配置这个有关(默认为net.fckeditor.requestcycle.impl.DisabledUserAction)
connector.userActionImpl = net.fckeditor.requestcycle.impl.EnabledUserAction
connector.userPathBuilderImpl = net.fckeditor.requestcycle.impl.ContextPathBuilder
localization.localeResolverImpl = net.fckeditor.localization.impl.AcceptLanguageHeaderResolver
可以去fckeditor-java-core-2.6.jar,net.fckeditor.handlers包下找default.properties这个是默认的配置文件,可以参考去修改自己想要的。
connector.userFilesAbsolutePath这个属性可以更改上传路径。
connector.userFilesPath这个属性应该与
connector.userFilesAbsolutePath相同不然上传的资源会找不到(默认为userfiles)。
第一次写自己的技术笔记,希望同大家分享一下,如有问题请指正,请大家多多关照。
如果真的帮到你了的话,请评论回复一下。
分享到:
相关推荐
jsp开发环境下的原版FCKeditor内有(jar和原版文件)
fckeditor_2.6.5.0fckeditor_2.6.5.0fckeditor_2.6.5.0fckeditor_2.6.5.0
fckeditor在ssh2项目中的应用: 所需jar包 web.xml配置 fckeditor.properties属性文件 jsp文件
FCKeditor_2.6.6.zip and FCKeditor_demo.zip.rar FCKeditor-java-core-2.6.jar
简单易操作ASP.NET mvc使用FCKeditor.zip在线编辑器示例
fckeditor.js文件中文注释 更新可以查看文章: http://blog.csdn.net/nileader4dev/archive/2010/12/12/6070727.aspx
FCKeditor2.6.4.1 在线编辑器 JSP 还有JSP上传文件组件
对fckeditor 文件上传功能的修改 1.文件上传绝对路径配置 2.文件上传按上传日期保存 3.浏览上传图片文件和flash文件添加预览功能
FCKeditor.java-2.3.2 + FCKeditor_2.5.1 + 中文API 黄金搭档! 最近做项目需要jsp里使用编辑器,在网上搜资料 几乎前篇一律, 版本太多,一晚上没睡 调试通了!有兴趣的可以研究下!
FCKEditor2.6使用小示例FCKEditor2.6使用小示例FCKEditor2.6使用小示例FCKEditor2.6使用小示例
fckeditor_v2.6.rarfckeditor_v2.6.rarfckeditor_v2.6.rarfckeditor_v2.6.rar php编辑器
FCKeditor.Net_2.6.3.zip ,FCKeditor.dll
4、限制上传文件大小(这个也设置了可以自主修改,找到fckeditor.properties文件最后的地方,# maxFileSize 1M connector.resource.maxFileSize=1048576,单位是字节) 5、把里边没用的文件都删除了,呵呵 其中的...
FCKeditor_2.6.4.1 .NET完整实例 图片上传 FLASH上传 分页符 …… 全部正常
java-core-2.6.jar,commons-fileupload-1.2.1.jar,commons-io-1.3.2.jar,imageinfo-1.9.jar,slf4j-api-1.5.8.jar,slf4j-simple-1.5.8.jar共六个
FCKeditor & FCKeditor.java & fck-faces
FCKeditor.Net_2.6.3.zip和FCKeditor-v2.6.3
//33行 默认上传路径,可以更改但必须在相应的目录下建这个名称的目录。 四、上传文件随机重命名为 201447202465.jpg 修改fckeditor/editor/filemanager/connectors/php/commands.php 1.第一段添加函数 [24行...
fckeditor-java-2.6-bin.zip fckeditor-java-2.6-src.zip FCKeditor_2.6.6.zip fckeditor-java-demo-2.6.war