KCFinder free file /image browser for CKEditor

This project is not covered by Drupal’s security advisory policy.

This module is unsupported due to a security issue the maintainer didn’t fix. See KCFinder integration - Critical - Unsupported Module - SA-CONTRIB-2018-024 for details.

If you want to use this module, your options are:

  • Choose another, actively maintained module instead
  • File an issue in the queue with a patch to fix the module and then contact the security team to have your version reviewed and the project handed over to you following the unsupported project process.
  • Hire someone to fix the security bug so the module can be re-published and supported (Consider hiring companies listed in the Marketplace)

Due to the KCFinder project being dead, this module has been abandoned. Consider using IMCE instead.

KCFinder is a multi-language file / image manager you can use to easily select, insert, upload and arrange images, flash movies, and other kinds of files.

KCFinder is licenced GPLv2 & LGPLv2, as in "free" and "open source".

This module integrates the KCFinder file manager to Drupal in 2 ways:

  • Your users will be able to select images / media directly from ckeditor.
  • You can add 2 new tabs to your user's profiles: "Image browser" and "File browser".

You can control which roles can use wich features with different permissions. Users can share a common folder or have different folders depending on the configuration.

Possible use examples

  • You want to allow some of your users to select and upload images easily while using CKeditor.
  • You want to let some of your users, manage their own files in their personal folder inside your website.
  • Same cases as above, but your users want to share a common folder.

Demonstration

In KCFinder's official site, you can see a working KCFinder / CKEditor demo here. Click on the "Insert image" icon and click the "Browse server" button to begin.

Requirements

  • Download the latest version of KCFinder in their official download page and extract it to your libraries' folder (usually "sites/all/libraries/"). Rename the resulting folder to "kcfinder".
  • Mandatory security measure: Open "kcfinder/config.php" and make sure "disabled" is true. If it's false, ANYONE will be able to access KCFinder and upload files.
  • if you want to allow ckeditor access, you should have WYSIWYG module installed and CKEditor installed and integrated through the WYSIWYG module.

Installation

  1. Install this module as usual. Activate the features you need:
    • KCFinder integration for user profile buttons (mandatory).
    • KCFinder WYSIWYG for WYSIWYG access to KCFinder.
  2. You need an existing directory where the images will be uploaded. By default, the module will try to use the path "sites/default/files/kcfinder", but you can also set a different one. In such case, set the upload folder URL path in the module' settings page. Make sure such folder exists and is writable (CHMOD 777) by the internet user.
  3. Assign the "Access KCFinder", "Show files in user profile" and "Show images in user profile" permissions to the roles you will allow to use such features.

Configuration

  • There's a module settings page where you can change the upload path (among other things) under "Administration" » "Configuration" » "Content authoring" » "KCFinder module settings" (admin/config/content/kcfinder).
  • You can also set the theme in the settings page. The themes "oxygen" and "dark" are included by default. You can also make your own theme by duplicating and modifying an existing one.
  • If you want each user to have his own upload directory, add %u (user ID) or %n (user name) to the upload directory path so that each user gets his own private folder (example: "sites/default/files/kcfinder/%u").
  • For advanced configuration of KCFinder, you can edit the "config.php" file inside the library's folder. Documentation can be found in http://kcfinder.sunhater.com/docs/install.

Usage

  • KCFinder integration: After installation and configuration, "Browse images" and "Browse files" should appear in user profiles with corresponding permissions.
  • KCFinder WYSIWYG: After installation and configuration, a "Browse server" button should appear in the CKEditor Image Dialog.

Troubleshooting

  • KCFinder window shows up blank and I get a "Cannot write to upload folder." message in CKEditor - Make sure your upload folder exists, has 777 permissions and matches the one configured in the settings page for this module.
  • I can insert images normally inside CKEditor, but when the node is published the image won't appear - Make sure the image (img) tag is available to your selected text format. If you can insert "img" tags without problems, check the "src" attribute of the published "img" tag and compare with the paths configured in the settings page of this module.
  • Incorrect .htaccess file. Cannot rewrite it! - The KCFinder library (not this module, the library itself) comes with it's own .htaccess file. You can a) delete it, or b) Edit the "config.php" file inside the library and set the '_check4htaccess' property to false.

Currently, we are actively working towards a stable release. If you find any problems using this module, please help us by telling us about it (open an issue) and you will get a reply as soon as possible.

Project information

  • caution Seeking new maintainer
    The current maintainers are looking for new people to take ownership.
  • caution No further development
    No longer developed by its maintainers.
  • Module categories: Media
  • chart icon319 sites report using this module
  • Created by danyalejandro on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases