1

I have added ckeditor to offer a nice WYSIWYG editor to my user. To allow them to upload pictures directly into this editor, I've installed kcfinder. I've put the following lines in my ckeditor's config :

config.filebrowserBrowseUrl = 'ckeditor/plugins/kcfinder/browse.php?type=files';
config.filebrowserImageBrowseUrl = 'ckeditor/plugins/kcfinder/browse.php?type=images';
config.filebrowserFlashBrowseUrl = 'ckeditor/plugins/kcfinder/browse.php?type=flash';
config.filebrowserUploadUrl = 'ckeditor/plugins/kcfinder/upload.php?type=files';
config.filebrowserImageUploadUrl = 'ckeditor/plugins/kcfinder/upload.php?type=images';
config.filebrowserFlashUploadUrl = 'ckeditor/plugins/kcfinder/upload.php?type=flash';

My problem : when I try to browse files on the server with kcfinder, Symfony tells me that there is no routes for "GET /admin/news_post_admin/ckeditor/plugins/kcfinder/browse.php". It looks like it tries to reach browse.php from my controller, which is not correct.

Any ideas how I could make Symfony find the correct path of browse.php ?

Alarid
  • 770
  • 1
  • 6
  • 19

1 Answers1

4

I was working on the integration between Symfony2 and KCFinder and recently finished a simple bundle. Main purpose of the bundle was the possibility to control access to the KCFinder (for logged in users only).

You can find instructions and download the bundle from here (page created on the fly): http://avaer.net/stuff/KCFinderBundle/

Hope you find this helpful.

Veelkoov
  • 1,366
  • 14
  • 26
  • That's a good start, thank you! I managed to integrate it in my Symfony 2.1 project. I had some trouble setting CKEditor config. I'm using trsteelckeditor bundle and I finally set KCFinder paths in my config_dev.yml and config_prod.yml, in the ckeditor section. – ermannob Aug 02 '13 at 14:59
  • Would you consider making this available via composer? – darkbluesun Feb 18 '15 at 04:31
  • I am sorry, but I probably won't be able to do that soon (that is: in a timespan worth waiting). This bundle requires upgrading to KCFinder 3.*, but I haven't even recently touched my project, where I use the bundle... – Veelkoov Feb 23 '15 at 12:13