SkillAgentSearch skills...

Filemanager

An open-source file manager released under MIT license. Up-to-date for PHP connector. This package is DEPRECATED. Now, please use RichFileManager available at : https://github.com/servocoder/RichFilemanager.

Install / Use

/learn @simogeo/Filemanager
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Filemanager

FM is an open-source file manager released under MIT license. It is an alternative to elfinder or CKFinder.

IMPORTANT: This package is DEPRECATED.

Now, please use RichFileManager package with a number of new features and improvements.

Support

Filemanager is under free license. If you want to support the filemanager development or just thank its main maintainer by paying a beer, you can make a donation by clicking the following button : Donate

Main features

  • A Filemanager relying on jquery.
  • Available in more than 20 languages.
  • Highly customizable
  • Can work as standalone application
  • Easy integration with RTE like CKEditor, TinyMCE and so on.
  • Easy integration with colorbox jquery plugin or HTML simple textfield
  • Several computer language connectors available. PHP is up-to-date
  • Ability to upload, delete, modify, download and move files
  • Ability to create folders
  • Support user permissions - based on session
  • Handle system permissions
  • Ability to pass config user file in URL
  • Multiple uploads support - based on dropzonejs
  • Online text / code edition - based on codeMirror
  • Online documents viewer - based on viewerJS
  • Opening a given folder
  • Opening exclusively a given folder
  • Passing parameters to the FM
  • File types restriction
  • Video and audio player relying on web browser capabilities
  • Textbox Search filter
  • Thumbnails generation
  • Image auto-resize
  • File size limit
  • File exclusion based on name and patterns
  • Images files only
  • Prevent files overwriting (or not)
  • Switch from list to grid view and vice-versa
  • Copy direct file URL
  • CSS Themes - Please, share your themes with others !
  • and more ...

Screenshot

Filemanager Screenshot

Documentation

Filemanager is highly documented on the wiki pages. API, see below.

Installation and Setup

Preamble

Since many changes have been done recently, only PHP and MVC connectors are now available. You can try the latest version for others connectors, but with no warranty they implement all features and work correctly.

To use other connectors, please download v0.8 version from https://github.com/simogeo/Filemanager/archive/v0.8.zip (PHP, ASHX, ASP, CFM, lasso, PL and JSP connectors are available)

A JSP/Java connector implementation is available at : https://github.com/th-schwarz/C5Connector.Java


(1) Check out a copy of the FileManager from the repository using Git :

git clone http://github.com/simogeo/Filemanager.git

or download the archive from Github : https://github.com/simogeo/Filemanager/archive/master.zip

You can place the FileManager anywhere within your web serving root directory.

(2) Make a copy of the default configuration file ("filemanager.config.default.json" located in the scripts directory), removing the '.default' from the end of the filename, and edit the options according to the following wiki page : https://github.com/simogeo/Filemanager/wiki/Filemanager-configuration-file Having a look on configuration cases study may also be helpful to you : https://github.com/simogeo/Filemanager/wiki/Specify-user-folder%2C-configuration-cases

(3a) If you are integrating the FileManager with FCKEditor, open your fckconfig.js file and find the lines which specify what file browser to use for images, links, etc. Look toward the bottom of the file. You will need to change lines such as this:

FCKConfig.ImageBrowser = false ;
FCKConfig.ImageBrowserURL = FCKConfig.BasePath + 'filemanager/browser/default/browser.html?Type=Image&Connector=../../connectors/' + _FileBrowserLanguage + '/connector.' + _FileBrowserExtension ;

...to this:

FCKConfig.ImageBrowser = true ;
FCKConfig.ImageBrowserURL = '[Path to Filemanager]/index.html' ;

(3b) If you are integrating the FileManager with CKEditor 3.x or higher, simply set the URL when you configure your instance, like so:

CKEDITOR.replace('instancename', {
	filebrowserBrowseUrl: '[Path to Filemanager]/index.html',
	...other configuration options...
});

If you want to use the modal dialog mode (instead of pop-up), please refer to the dedicated wiki page.

(3c) If you are integrating the FileManager with TinyMCE (>= 3.0), you should:

Create a Javascript callback function that will open the FileManager index.html base page (see URL below for examples) Add a line like: "file_browser_callback : 'name_of_callback_function'" in the tinyMCE.init command See http://www.tinymce.com/wiki.php/TinyMCE3x:How-to_implement_a_custom_file_browser for more details.

See also the dedicated wiki page, with TinyMCE 4 sample : https://github.com/simogeo/Filemanager/wiki/How-to-use-the-Filemanager-with-tinyMCE-3-or-4

(4) Last but not least, worry about security!

For PHP connector : copy/paste the /connectors/php/default.config.php to /connectors/php/user.config.php to define your own authentication function. To do so, you will find an example on the dedicated wiki page.

jQuery dependency and compatibility

We try to keep updating jQuery core library regularly. If, for any reason, you can't use the embedded jQuery version just now that the Filemanager will probably work with a jQuery version >= 1.6. You'll have to use the jQuery.migrate() plugin to use it with jQuery version 1.9+.

Set-up & security

Important : The Filemanager is designed to work without any special configuration but using it without any configuration is VERY unsafe. Please set-up your own authentication function, based on default file and refering to the dedicated wiki page.

API

Connector Location

You can create a connector for your server side language of choice by following this simple API. You must have a script at the following location which can respond to HTTP GET requests by returning an appropriate JSON object:

[path to FileManager]/connectors/[language extension]/filemanager.[language extension]

FileManager currently includes connectors for PHP, MVC, JSP, lasso, ASP, ASHX, PL and CFM in the following locations:

PHP: .../connectors/php/filemanager.php
ASP.NET MVC Framework .../connectors/mvc/FilemanagerController.cs
JSP: .../connectors/jsp/filemanager.jsp
lasso: .../connectors/lasso/filemanager.lasso
ASP: .../connectors/asp/filemanager.asp
ASHX: .../connectors/ashx/filemanager.asp
PL: .../connectors/pl/filemanager.pl
CFM: .../connectors/cfm/filemanager.cfm

As long as a script exists at this location to respond to requests, you may split up the code (external libraries, configuration files, etc.) however you see fit.

Error Handling

Every response should include two keys specific to error handling: Error, and Code. If an error occurs in your script, you may populate these keys with whatever values you feel are most appropriate. If there is no error, Error should remain empty or null, and Code should be empty, null, or zero (0). Do not use zero for any actual errors. The following example would be an appropriate response if the connector uses an external file for configuration (recommended), but that file cannot be found:

{
  "Error": "Configuration file missing.",
  "Code":  -1
}

Methods

Your script should include support for the following methods/functions. GET requests from FileManager include a parameter "mode" which will indicate which type of response to return. Additional parameters will provide other information required to fulfill the request, such as the current directory.

getinfo

The getinfo method returns information about a single file. Requests with mode "getinfo" will include an additional parameter, "path", indicating which file to inspect. A boolean parameter "getsize" indicates whether the dimensions of the file (if an image) should be returned.

Example Request:

[path to connector]?mode=getinfo&path=/UserFiles/Image/logo.png&getsize=true

Example Response:

{
  "Path": "/UserFiles/Image/logo.png",
  "Filename": "logo.png",
  "File Type": "png",
  "Preview": "/UserFiles/Image/logo.png",
  "Protected": 0,
  "Properties": {
    "Date Created": null,
    "Date Modified": "02/09/2007 14:01:06",
    "filemtime": 1360237058,
    "Height": 14,
    "Width": 14,
    "Size": 384
  },
  "Error": "",
  "Code": 0
}

The keys are as follows:

Path: The path to the file. Should match what was passed in the request.

Filename: The name of 

Related Skills

View on GitHub
GitHub Stars938
CategoryDevelopment
Updated17d ago
Forks345

Languages

JavaScript

Security Score

85/100

Audited on Mar 9, 2026

No findings