* Default elFinder config
* @autor Dmitry (dio) Levashov
elFinder.prototype._options = {
* URLs of 3rd party libraries CDN
ace : 'https://cdnjs.cloudflare.com/ajax/libs/ace/1.22.0',
codemirror : 'https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7',
ckeditor : 'https://cdnjs.cloudflare.com/ajax/libs/ckeditor/4.21.0',
ckeditor5 : 'https://cdn.ckeditor.com/ckeditor5/38.0.1',
tinymce : 'https://cdnjs.cloudflare.com/ajax/libs/tinymce/6.4.2',
simplemde : 'https://cdnjs.cloudflare.com/ajax/libs/simplemde/1.11.2',
fabric : 'https://cdnjs.cloudflare.com/ajax/libs/fabric.js/5.3.1',
fabric16 : 'https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7',
tui : 'https://uicdn.toast.com',
hls : 'https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.4.4/hls.min.js',
dash : 'https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.7.0/dash.all.min.js',
flv : 'https://cdnjs.cloudflare.com/ajax/libs/flv.js/1.6.2/flv.min.js',
videojs : 'https://cdnjs.cloudflare.com/ajax/libs/video.js/8.3.0',
prettify : 'https://cdn.jsdelivr.net/gh/google/code-prettify@e006587b4a893f0281e9dc9a53001c7ed584d4e7/loader/run_prettify.js',
psd : 'https://cdnjs.cloudflare.com/ajax/libs/psd.js/3.4.0/psd.min.js',
rar : 'https://cdn.jsdelivr.net/gh/nao-pon/rar.js@6cef13ec66dd67992fc7f3ea22f132d770ebaf8b/rar.min.js',
zlibUnzip : 'https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/unzip.min.js', // need check unzipFiles() in quicklook.plugins.js when update
zlibGunzip : 'https://cdn.jsdelivr.net/gh/imaya/zlib.js@0.3.1/bin/gunzip.min.js',
bzip2 : 'https://cdn.jsdelivr.net/gh/nao-pon/bzip2.js@0.8.0/bzip2.js',
marked : 'https://cdnjs.cloudflare.com/ajax/libs/marked/5.0.4/marked.min.js',
sparkmd5 : 'https://cdnjs.cloudflare.com/ajax/libs/spark-md5/3.0.2/spark-md5.min.js',
jssha : 'https://cdnjs.cloudflare.com/ajax/libs/jsSHA/3.3.0/sha.min.js',
amr : 'https://cdn.jsdelivr.net/gh/yxl/opencore-amr-js@dcf3d2b5f384a1d9ded2a54e4c137a81747b222b/js/amrnb.js',
tiff : 'https://cdn.jsdelivr.net/gh/seikichi/tiff.js@545ede3ee46b5a5bc5f06d65954e775aa2a64017/tiff.min.js'
* Connector url. Required!
* Use CORS to connector url
* @type Boolean|null true|false|null(Auto detect)
* Array of header names to return parrot out in HTTP headers received from the server
* Maximum number of concurrent connections on request
* Transport to send request to backend.
* Required for future extensions using websockets/webdav etc.
* Must be an object with "send" method.
* transport.send must return $.Deferred() object
* init : function(elfinderInstance) { },
* send : function(options) {
* var dfrd = $.Deferred();
* // connect to backend ...
* upload : function(data) {
* var dfrd = $.Deferred();
* If not set - connector URL will be used
* Allow to drag and drop to upload files
dragUploadAllow : 'auto',
* Confirmation dialog displayed at the time of overwriting upload
overwriteUploadConfirm : true,
* Max size of chunked data of file upload
* @default 10485760(10MB)
uploadMaxChunkSize : 10485760,
* Regular expression of file name to exclude when uploading folder
* @default { win: /^(?:desktop\.ini|thumbs\.db)$/i, mac: /^\.ds_store$/i }
win: /^(?:desktop\.ini|thumbs\.db)$/i,
* Timeout for upload using iframe
* @default 0 - no timeout
* Data to append to all requests and to upload files
* Event listeners to bind on elFinder init
* Any custom headers to send across every ajax request
* Any custom xhrFields to send across every ajax request
* Base URL of elfFinder library starting from Manager HTML
* Auto detect when empty value
* Base URL of i18n js files
* baseUrl + "js/i18n/" when empty value
* Base URL of worker js files
* baseUrl + "js/worker/" when empty value
* `false` to disable this function or
* CSS URL Array to load additional CSS files
* {"themeid" : "Theme CSS URL"} or
* {"themeid" : "Theme manifesto.json URL"} or
* Theme manifesto.json Object
* "cssurls":"Theme CSS URL",
* "author":"Author Name",
* "email":"Author Email",
* "image":"Screen Shot URL",
* "description":"Description"
* Theme id to initial theme
* Maximum value of error dialog open at the same time
* Additional css class for filemanager node.
* Active commands list. '*' means all of the commands that have been load.
* If some required commands will be missed here, elFinder will add its
// Available commands list
// 'archive', 'back', 'chmod', 'colwidth', 'copy', 'cut', 'download', 'duplicate', 'edit', 'extract',
// 'forward', 'fullscreen', 'getfile', 'help', 'home', 'info', 'mkdir', 'mkfile', 'netmount', 'netunmount',
// 'open', 'opendir', 'paste', 'places', 'quicklook', 'reload', 'rename', 'resize', 'restore', 'rm',
// 'search', 'sort', 'up', 'upload', 'view', 'zipdl'
// // configure shortcuts of any command
// // add `shortcuts` property into each command
// shortcuts : [] // for disable this command's shortcuts
// shortcuts : function(fm, shortcuts) {
// // for add `CTRL + E` for this command action
// shortcuts[0]['pattern'] += ' ctrl+e';
// shortcuts : function(fm, shortcuts) {
// // for full customize of this command's shortcuts
// return [ { pattern: 'ctrl+e ctrl+down numpad_enter' + (fm.OS != 'mac' && ' enter') } ];
// "getfile" command options.
// allow to return multiple files info
// allow to return filers info
// action after callback (""/"close"/"destroy")
// action when callback is fail (""/"close"/"destroy")
// get path before callback call
// get image sizes before callback call
// HTTP method that request to the connector when item URL is not valid URL.
// If you set to "get" will be displayed request parameter in the browser's location field
// so if you want to conceal its parameters should be given "post".
// Nevertheless, please specify "get" if you want to enable the partial request by HTTP Range header.
// Where to open into : 'window'(default), 'tab' or 'tabs'
// 'tabs' opens in each tabs
// Default command list of action when select file
// String value that is 'Command Name' or 'Command Name1/CommandName2...'
// URL of to open elFinder manager
// Default '' : Origin URL
// Use search query of origin URL
// "upload" command options.
// Open elFinder upload dialog: 'button' OR Open system OS upload dialog: 'uploadbutton'
// "download" command options.
// max request to download files when zipdl disabled
// minimum count of files to use zipdl
// "quicklook" command options.
// ControlsList of HTML5 audio/video preview
// see https://googlechrome.github.io/samples/media/controlslist.html
mediaControlsList : '', // e.g. 'nodownload nofullscreen noremoteplayback'
// Show toolbar of PDF preview (with <embed> tag)
// Maximum lines to preview at initial
// Maximum lines to preview by prettify
// quicklook window must be contained in elFinder node on window open (true|false)
// preview window into NavDock (0 : undocked | 1 : docked(show) | 2 : docked(hide))
// Docked preview height ('auto' or Number of pixel) 'auto' is setted to the Navbar width
// media auto play when docked
// Google Maps API key (Require Maps JavaScript API)
// Google Maps API Options
suppressInfoWindows : false,
// ViewerJS (https://viewerjs.org/) Options
// To enable this you need to place ViewerJS on the same server as elFinder and specify that URL in `url`.
url: '', // Example '/ViewerJS/index.html'
mimes: ['application/pdf', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation'],
pdfNative: true // Use Native PDF Viewer first
// MIME types to CAD-Files and 3D-Models online viewer on sharecad.org
// Example ['image/vnd.dwg', 'image/vnd.dxf', 'model/vnd.dwf', 'application/vnd.hp-hpgl', 'application/plt', 'application/step', 'model/iges', 'application/vnd.ms-pki.stl', 'application/sat', 'image/cgm', 'application/x-msmetafile']
// MIME types to use Google Docs online viewer
// Example ['application/pdf', 'image/tiff', 'application/vnd.ms-office', 'application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/postscript', 'application/rtf']
// MIME types to use Microsoft Office Online viewer
// Example ['application/msword', 'application/vnd.ms-word', 'application/vnd.ms-excel', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.presentation']
// These MIME types override "googleDocsMimes"
// File size threshold when using the dim command for obtain the image size necessary to image preview
getDimThreshold : '200K',
// Max filesize to show filenames of the zip/tar/gzip/bzip file
// MIME-Type regular expression that does not check empty files
mimeRegexNotEmptyCheck : /^application\/vnd\.google-apps\./
// "edit" command options.
// dialog width, integer(px) or integer+'%' (example: 650, '80%' ...)
// dialog height, integer(px) or integer+'%' (example: 650, '80%' ...)
// list of allowed mimetypes to edit of text files
// if empty - any text files can be edited
// MIME-types to unselected as default of "File types to enable with "New file"" in preferences
// MIME-types of text file to make empty file
makeTextMimes : ['text/plain', 'text/css', 'text/html'],
// Use the editor stored in the browser
// This value allowd overwrite with user preferences
// Open the maximized editor window
// This value allowd overwrite with user preferences
// edit files in wysisyg's
// info : { name: 'Editor Name' },
// * files mimetypes allowed to edit in current wysisyg
// mimes : ['text/html'],
// * HTML element for editing area (optional for text editor)
// html : '<textarea></textarea>',
// * Initialize editing area node (optional for text editor)
// * @param String dialog DOM id
// * @param Object target file object
// * @param String target file content (text or Data URI Scheme(binary file))
// * @param Object elFinder instance
// init : function(id, file, content, fm) {
// $(this).attr('id', id + '-text').val(content);
// * Get edited contents (optional for text editor)
// getContent : function() {
// * Called when "edit" dialog loaded.
// * Place to init wysisyg.
// * Can return wysisyg instance
// * @param DOMElement textarea node
// * @return Object editor instance|jQuery.Deferred(return instance on resolve())
// load : function(textarea) { },
// * Called before "edit" dialog closed.
// * Place to destroy wysisyg instance.
// * @param DOMElement textarea node
// * @param Object wysisyg instance (if was returned by "load" callback)
// close : function(textarea, instance) { },
// * Called before file content send to backend.
// * Place to update textarea content if needed.
// * @param DOMElement textarea node
// * @param Object wysisyg instance (if was returned by "load" callback)