Skip to content

Filemanager configuration file

Simon Georget edited this page Oct 9, 2016 · 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.default.json

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.

theme Default value "flat-dark". 3 themes are available in the package: default, flat-dark, flat-turquoise and flat-oil. You can create your own theme, simply by following instructions.

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.

cacheThumbnails. Default value true. If set to false, it will generate thumbnail without caching them. Decreased performance.

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 left 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.

quickSelect: Default value false. Select file on main listing - avoid an extra click.

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

splitterWidth: Default left column width in pixel. Default to 200 (should be set as numeric value).

splitterMinWidth: Default left column width in pixel. Default to 200 (should be set as numeric value).

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.

fileConnector. Default value /connectors/(options.lang)/filemanager.(options.lang). Path to server-side connector script. By default the application will determine it based on lang option. For PHP language it would be: /connectors/php/filemanager.php. Can be overwritten to your own connector script path.

baseUrl. 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 server-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

allowFolderDownload: Default value is false. Allow users to download a Zip archive of a specific folder and contents (including subfolders).

allowChangeExtensions: Default value is false. Allow users to change extension when renaming files.

allowNoExtension: Default value is false. If set to true, allow users to upload file with no extension.

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. Array of files extensions. Fix restrictions on upload checking extension files.

The upload section

multiple Default value true. Do enable multiple uploads, rely on dropzonejs.

number Default value 5. Only used when multiple is set to true. Maximum number of files to handle on each Upload request.

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 pdfs section

showPdfReader Default value true. Show PDF online ?

pdfsExt Array of pdfs extensions to embed in viewer (default are pdf and odp).

pdfsReaderWidth Default value 640. Videos player width in pixels

pdfsReaderHeight Default value 480. Videos player height in pixels

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

codeHighlightDefault value false. Enable code highlighter. This feature may slow-down the filemanager.

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 customScrollbar section

You can enable the jquery custom scrollbar plugin to enhance UI. Notice, that this will decrease FM loading speed.

enabled Default value false. Enable it by passing the value true.

theme Default value true. Specify the scrollbar theme you want to use. See available options.

button Default value true. Add buttons to scrollbars (takes value true or false).

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.

The system section

locale Default value "en_US.UTF-8". Default locale to prevent encoding issue, utf-8 is needed.

timezone Default value "UTC". You can choose a value from http://php.net/manual/fr/timezones.php

Clone this wiki locally