浏览 1866 次
|
锁定老贴子 主题:rails fckeditor上传图片错误
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
|---|---|
| 作者 | 正文 |
|
最后更新时间:2007-05-02 关键字: fckeditor
试了下rails的fckeditor插件,发现上传图片出现了js错误。大家有无遇到,是怎么解决的?网站上的demo也是同样的错误。
声明:JavaEye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
|
|
| 返回顶楼 | |
|
最后更新时间:2007-05-02
没人遇到过?
|
|
| 返回顶楼 | |
|
最后更新时间:2007-05-29
可能是fckcustom.js的文件编码形式不是utf-8造成的,用Notepad另存为utf-8格式.
|
|
| 返回顶楼 | |
|
最后更新时间:2007-06-08
这里有解决方法:
http://www.blogjava.net/rocky/archive/2006/11/04/rails-fckeditor-integration.html |
|
| 返回顶楼 | |
|
最后更新时间:2007-07-14
如果你的blog只是ror工程下的一个controller,
按照fckeditor的plugin介绍的方法设置FCKRelativePath = 'app'是不对的,而应该是空字符串。 我也遇到了这样的问题,后来发现了原因 希望对你有帮助 |
|
| 返回顶楼 | |
|
最后更新时间:2007-08-25
我也遇到了同样的错误,上传图片出错。我的环境是:ruby 1.8.5 + Rails 1.2.3 + FCKeditor 0.4.1
出错alert对话框显示:Error on file upload.Error number: 403 在日志里显示如下,表面上看好象是路由配置的问题 ActionController::RoutingError (no route found to match "/fckblank.html" with {:method=>:get}): /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1292:in `recognize_path' /var/lib/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/routing.rb:1282:in `recognize' /var/lib/gems/1.8/gems/rails-1.2.3/lib/dispatcher.rb:40:in `dispatch' /var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:113:in `handle_dispatch' /var/lib/gems/1.8/gems/rails-1.2.3/lib/webrick_server.rb:79:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' |
|
| 返回顶楼 | |
|
最后更新时间:2007-08-25
我在http://blog.caronsoftware.com/articles/2006/12/03/fckeditor-0-4-0-released#comment-1745
找到了答案。 # Chris on 2007年02月17日 If you are getting the 403 error when trying to upload an image I found where it is bombing out and a workaround. If you go into the plugin and edit the file: app/controller/fckeditor_controller.rb The error comes from the check_file method. Edit the following line: unless "#{file.class}" == "Tempfile" And change it to this: unless "#{file.class}" == "Tempfile" || "#{file.class}" == "StringIO" This worked around it for me as the file.class returned as a StringIO instead of a Tempfile. Everything worked fine with this change and the images made it up to where they were supposed to go. Hope this helps anyone getting stuck with this. |
|
| 返回顶楼 | |
|
最后更新时间:2007-09-13
我在图片上传过程中也出现了错误,当我选择图片,点击"上传的服务器"的时候,出现js脚本错误,提示: 但我看到\public\uploads\Image目录下图片已经上传成功了.不知道错在哪里? |
|
| 返回顶楼 | |






