Skip to content

Filemanager configuration file

Simon Georget edited this page Mar 27, 2014 · 42 revisions

The Filemanager uses now a JSON file for sharing configuration between the client-side (javascript part) and the server-side (connector part).

The Filemanager is highly customizable by changing vars values into config files. It is organized in sections.

The default configuration file is visible from code source repository : https://github.com/simogeo/Filemanager/blob/master/scripts/filemanager.config.js.default

For more information on Filemanager setup, see also Specify user folder, configuration cases

The options section

culture Default value "en". Set culture to display localized messages. Available languages are listed in languages folder.

lang Default value "php". Set this to the server side language you wish to use - options: php, jsp, lasso, asp, cfm, ashx, asp, pl.

defaultViewMode Default value "grid". Set default view mode : 'grid' or 'list'

autoload Default value true. Autoload text in GUI - If set to false, set values manually into the HTML file

showFullPath Default value false. Display full path or not.

showTitleAttr Default value false. Display title attributes on mouse hover (main panel only).

browseOnly Default value false. Allow users to browse only. Prevent upload/dowload and others interactions.

showConfirmation Default value true. Do show a confirmation message after running actions

showThumbs Default value true. Show image previews in grid/list views?

"generateThumbnails Default value true. Generate thumbnails using PHP to increase performance on listing directory. Can take value true or false. Thumbnails are stored into the invisible folder '_thumbs'. If you want to make it visible, just remove it from unallowed_files configuration section.

searchBox Default value true. Display search box on the bottom (left) to let user filter results on special files. Can take value true or false.

listFiles Default value true. Display files in right column (filetree). If set to false, will display only folders. Can take value true or false.

fileSorting: Default value default. Can take value "default", "NAME_ASC", "NAME_DESC", "TYPE_ASC", "TYPE_DESC", "MODIFIED_ASC", "MODIFIED_DESC", see specific page for options.

chars_only_latin: Default value true. To allow non-latin characters into folders name, just set it to false.

dateFormat Default value "d M Y H:i". Format of the date to display, related to connector. For example see date function page for PHP : http://www.php.net/manual/en/function.date.php

serverRoot. By default true. By default, the application will search fileRoot folder under server root folder. If fileRoot is set to false, serverRoot value is not interpreted by the filemanager -always true.

fileRoot. Default value false. The application will determine the path itself. Can be overwritten, to display a specific folder under server root or a folder not located under Server root directory. If used with serverRoot set to true, do not provide initial slash to fileRoot value.

relPath. Default value false. The application will determine the path itself. Can be overwritten, to display a folder not located under Server root directory.

capabilities. Take an array as value. By default, all capabilities handled by the application are available : ["select", "download", "rename", "move", "delete"]. You can restrict it by suppressing some of them.

logger. Default value false. If set to true the filemanager will log servcer-side action into /tmp/filemanager.log file by default. If you want to change the default file path , add the key logfile to the JSON file with the desired value - for example : "logfile": "C:/filemanager_log.txt"

plugins. Plugins to init. Implementation not completed yet.

The security section

uploadPolicy. Default value "DISALLOW_ALL". takes value "ALLOW_ALL" / "DISALLOW_ALL". If is set to "DISALLOW_ALL", only files with extensions contained in uploadRestrictions array will be allowed. If is set to "ALLOW_ALL", all files will be accepted for upload except for files with extensions contained in uploadRestrictions.

uploadRestrictions. Fix restrictions on upload checking extension files.

The upload section

overwrite Default value false. If set to true, files will be overwritten on uploads if they have same names. If set to false, an index will be added.

imagesOnly Default value false. If set to true, only images are accepted for upload.

fileSizeLimit Default value 16. File size limit for HTML5 and connector file size check. In MB. If set to auto fileSizeLimit is estimated by connector itself.

The exclude section

unallowed_files Array of files excluded from listing.

unallowed_folders Array of folders excluded from listing.

unallowed_files_REGEXP Files excluded from listing, using REGEX.

unallowed_folders_REGEXP Folders excluded from listing, using REGEX.

The images section

imagesExt Array of accepted images extensions.

resize. Contains an associative arrays with 3 entries : enabled (takes values true or false), maxWidth and maxHeight (are expressed in pixels). Adjust settings to your needs. By default resize is enabled.

The videos section

showVideoPlayer Default value true. Show browser video player?

videosExt Array of videos extensions to embed in player.

videosPlayerWidth Default value 400. Videos player width in pixels

videosPlayerHeight Default value 222. Videos player height in pixels

The audios section

showAudioPlayer Default value true. Show browser audio player?

audiosExt Array of audios extensions to embed in player.

The edit section

enabled Default value true. Enable online edit

lineNumbers Default value true. Display line numbers into the editor

lineWrapping Default value true. Enable wrapping into the editor

theme Default value elegant. Set the editor theme. Available themes are listed here (do not include css extension).

editExt Array of files extensions for online edition.

The extras section

extra_js Default empty array. Array of javascript files to load. For example use this to load tiny_mce_popup.js

extra_js_async Default value true. Specify if request is asynchronous or not (takes value true or false).

The icons section

path Default value "images/fileicons/". Path to icons folder.

directory Default value _"Open.png". Default directory icon.

default Default value "default.png". Default file icon.