Skip to content
Naoki Sawada edited this page Feb 28, 2017 · 23 revisions

Minimal setup

  1. Download and unzip one of the releases below to your PHP server
  2. Rename /php/connector.minimal.php-dist to /php/connector.minimal.php
  3. Load /elfinder.html in your browser to run elFinder

Configuration explained

Require JS

By default, Require JS loads "./main.default.js" and processes it.

<script data-main="./main.default.js" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.3.2/require.min.js"></script>

In "main.default.js", JavaScript and CSS of jQuery, jQueryUI and elFinder are loaded. Moreover, it reads the language file by the browser language specification.

If you need to change elFinder client settings, rename main.default.js to main.js and make changes. This is necessary to ensure that changes are not lost when updating elFinder.

<script data-main="./main.js" src="//cdnjs.cloudflare.com/ajax/libs/require.js/2.3.2/require.min.js"></script>

The following section of main.default.js is used to specify the option of elFinder file manager.

// elFinder options (REQUIRED)
// Documentation for client options:
// https://github.com/Studio-42/elFinder/wiki/Client-configuration-options
opts = {
	url : 'php/connector.minimal.php', // connector URL (REQUIRED)
	lang: lang                         // auto detected language (optional)
},

jQuery and jQuery UI

jQuery >= 1.8.0 and jQuery UI >= 1.9.1 are required. If you use custom jQuery UI build than make sure selectable, draggable, droppable, resizable, dialog, slider and tabs are included.

Initialize file manager

Create elFinder on your page.

<!-- Element where elFinder will be created (REQUIRED) -->
<div id="elfinder"></div>

Note: by default connector file name ends with -dist, you need to remove (rename) it first. This is done to prevent security issue with default elFinder install.

For more advanced options check available client configuration options and connector configuration options.

See the full html example and main.js example.

Clone this wiki locally