0

There is a CKEditor in my rails app working with Paperclip and Active Record. Works nicely but:

When uploading a file which contains cyrillic letters in filename, cyrillic letters are being cut (e.g. "документ_1_15.doc" becomes "_1_15.doc"). Nothing of this happens when uploading an image directly with Paperclip. I tried to look into CKeditor code for answer, but couldn't find anything since CKEditor is being mounted as an Engine into the app.

p.s. Sorry for maybe a newbie question -- it's my first one on StackOverflow. Thanks!

sca_
  • 673
  • 5
  • 10

1 Answers1

0

Found the solution in changing CKEditor gem files a bit.

The issue was in [basename.parameterize('_'), extension].join.downcase string in gem's /lib/ckeditor/utils.rb file (/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ckeditor-4.0.6/lib/ckeditor/utils.rb in my case). Unfortunately Ruby's parametrize function rejects cyrillic symbols, so I had to change in to [basename.gsub(/\s/,'_'), extension].join.downcase and it stopped cutting down cyrillics.

sca_
  • 673
  • 5
  • 10