-
Notifications
You must be signed in to change notification settings - Fork 0
Client configuration options
TODO this page is still not finished
This is a list of the available options for elFinder client (javascript) part, along with their default values. Options are specified by passing an object with certain properties into the first argument of $.elfinder(). Example:
var elfOptions = {
url: 'php/connector.php',
lang: 'en'
}
var elf = $('#elfinder').elfinder(elfOptions).elfinder('instance'); Note: This page is in progress and as such will not list everything. For further documentation, see inside the js/elFinder.options.js file.
The AJAX request type. Available choices are post and get.
Data type: string
Default value: 'get'
Allow to drag and drop to upload files.
Data type: string
Default value: 'auto'
Data to append to all requests and to upload files. These can be any extra data that must be passed to the connector script. For example, you could use these to pass authentication information.
Data type: object
Default value: {}
The interface lang to use. Can currently be one of the following: ar, cs, de, en, fr, jp, nl, pt_BR, ru
Data type: string
Default value: 'en'
Additional css class for filemanager node. This will be applied to the main filemanager container.
Data type: string
Default value: ''
UI plugins to load. Currently dir, ui, and dialogs loads always.
Data type: array
Default value: ['toolbar', 'places', 'tree', 'path', 'stat']
Specifies the configuration for the elFinder UI.
Data type: object
Default value:
// toolbar configuration
toolbar : [
['back', 'forward'],
// ['reload'],
// ['home', 'up'],
['mkdir', 'mkfile', 'upload'],
['open', 'download', 'getfile'],
['info'],
['quicklook'],
['copy', 'cut', 'paste'],
['rm'],
['duplicate', 'rename', 'edit', 'resize'],
['extract', 'archive'],
['search'],
['view'],
['help']
],
// directories tree options
tree : {
// expand current root on init
openRootOnLoad : true,
// auto load current dir parents
syncTree : true
},
// navbar options
navbar : {
minWidth : 150,
maxWidth : 500
}Display only certain files based on their mime type.
Data type: array
Default value: []
Example:
onlyMimes: ["image"] // display all images
onlyMimes: ["image/png", "application/x-shockwave-flash"] // display png and flashHow to sort files in a directory view.
Data type: string
Default value: nameDirsFirst
Available options:
-
'nameDirsFirst'- sort by name, directory first -
'kindDirsFirst'- sort by kind, name, directory first -
'sizeDirsFirst'- sort by size, name, directory first -
'name'- sort by name -
'kind'- sort by kind, name -
'size'- sort by size, name
The width of the elFinder main interface.
Data type: string or number
Default value: 'auto'
Available options: Can be the string 'auto' or any number measurement (in pixels).
The height of the elFinder main interface.
Data type: string or number
Default value: 400
Available options: Can be the string 'auto' or any number measurement (in pixels).
Whether or not the elFinder interface will be resizable. This only works if jQuery UI has the resizable plugin loaded.
Data type: boolean
Default value: true
Timeout before open notifications dialogs.
Data type: number
Default value: 500
Used to validate file names. By default, no empty names or '..' allowed.
Data type: boolean, regexp, or function
Default value: false
Example:
// disable names with spaces
validName: /^[^\s]$/The configuration for the right-click context menu. Need some better documentation on this.
Default value:
contextmenu : {
// navbarfolder menu
navbar :
['open', '|', 'copy', 'cut', 'paste', 'duplicate', '|', 'rm', '|', 'info'],
// current directory menu
cwd :
['reload', 'back', '|', 'upload', 'mkdir', 'mkfile', 'paste', '|', 'info'],
// current directory file menu
files :
['getfile', '|','open', 'quicklook', '|', 'download', '|', 'copy', 'cut', 'paste', 'duplicate', '|', 'rm', '|', 'edit', 'rename', 'resize', '|', 'archive', 'extract', '|', 'info']
},