-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Install
- Download and unzip one of the releases below to your PHP server
- Rename /php/connector.minimal.php-dist to /php/connector.minimal.php
- Load /elfinder.html in your browser to run elFinder
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 >= 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.
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.