-
Notifications
You must be signed in to change notification settings - Fork 0
Filemanager configuration file
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/servocoder/RichFilemanager/blob/master/scripts/filemanager.config.default.json
For more information on Filemanager setup, see also Specify user folder, configuration cases
culture
- Default value "en". Set culture to display localized messages. Available languages are listed in languages folder.
theme
- Default value "flat-dark". 4 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'
localizeGUI
- Default value true. Append localized text in GUI. Set to false
if you want to 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.
searchBox
- Default value true. Display search box on the bottom (left) to let user filter results on special files.
listFiles
- Default value true. Display files in left column (filetree). If set to false, will display only folders.
fileSorting
- Default value "NAME_ASC". Sorting files criteria. See specific page for available values.
folderPosition
- Default value "bottom". Position of folders in files/folders list. Takes value "bottom" or "top".
quickSelect
- Default value false. Select file on main listing - avoid an extra click.
charsLatinOnly
- Default value false. Deny non-latin characters in file/folder names.
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).
baseUrl
- Default value false. The application will determine the path itself. Can be overwritten, to display a folder not located under Server root directory.
logger
- Default value false. If set to true the filemanager will log some workflow actions to the browser debug console.
capabilities
- Take an array as value. By default, all capabilities handled by the application are available : ["select", "upload", "download", "rename", "move", "replace", "delete"]. You can restrict it by suppressing some of them.
lang
- Default value "php". Set this to the server side language you wish to use. Available values: php, jsp, lasso, asp, cfm, ashx, asp, pl.
connectorUrl
- Default value false. Url to server-side connector script. By default the application will determine it based on lang
option. For PHP language it would be: "{FM_base_url}/connectors/php/filemanager.php". Can be overwritten with an absolute url.
requestParams
- Default value []. Parameters which will be passed with each request to the connector.
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.
normalizeFilename
- Default value is true. Sanitize file/folder name, replaces gaps and some other special chars. Implemented on both client-side (javascript) and server-side (PHP connector). Important: client-side implementation doesn't impact while file uploading, so consider it as an extra layer of protection, but rely on server-side implementation.
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.
multiple
- Default value true. Do enable multiple uploads, rely on jQuery-File-Upload.
paramName
- Default value "files". The parameter name for the file form data (the request argument name). See details.
chunkSize
- Default value false. To upload large files in smaller chunks, set this option to a preferred chunk size (in Bytes). If set to false, files will be uploaded as a whole. See details.
numberOfFiles
- Default value 5. Maximum number of files to be processed per each multiple upload process. Only used when multiple
is set to true. See details.
fileSizeLimit
- Default value 16000000 (16 MB). The maximum allowed file size (in Bytes). If set to false, no size limitations applied. See details.
overwrite
- Default value false. If set to true, files will be overwritten on uploads if they have same names, otherwise an index will be added.
imagesOnly
- Default value false. If set to true, only images are accepted for upload.
absolutePath
- Default value true. Absolute path is used to preview images and media files. If set to false files will be previewed utilizing the connector path. Helpful when files aren't reachable by direct URL.
previewUrl
- Default value false. Used along with absolutePath
set to true, in case your files supposed to be previewed with some custom URL which differs from the baseUrl
.
showThumbs
- Default value true. Show image previews in grid/list views.
imagesExt
- Array of accepted images extensions.
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
showAudioPlayer
- Default value true. Show browser audio player?
audiosExt
- Array of audios extensions to embed in player (default are ogg, mp3, wav).
showPdfReader
- Default value true. Show PDF preview.
pdfsExt
- Array of extensions to embed in viewer (default are pdf, odt, odp, ods).
pdfsReaderWidth
- Default value 640. Viewer width in pixels.
pdfsReaderHeight
- Default value 480. Viewer height in pixels.
showGoogleViewer
- Default value true. Enable Google Docs Viewer.
docsExt
- Array of extensions to embed in viewer (default are doc, docx, xls, xlsx, ppt, pptx).
docsReaderWidth
- Default value 640. Viewer width in pixels.
docsReaderHeight
- Default value 480. Viewer height in pixels.
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
codeHighlight
- Default 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 (default are txt, csv).
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).
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).
path
- Default value "images/fileicons/". Path to icons folder.
folder
- Default value _"Open.png". Default folder icon.
parent
- Default value _"Parent.png". Parent folder icon.
default
- Default value "default.png". Default file icon.