This document is the index/reference page for all configuration options available in the MCFileManager.
Configuration options
All configuration options are located in a file called "config.php". There are also two example configuration files one "config.php.example" and "config.php.minimal" where the first if a example config and minimal contains the minimum amount of options needed to be modified inorder to get MCFileManager up and running.
General options
- general.debug
- general.demo
- general.demo_msg
- general.theme
- general.language
- general.user_friendly_paths
- general.tools
- general.disabled_tools
- general.login_page
- general.error_log
- general.allow_override
Preview options
Createdir options
- createdir.include_directory_pattern
- createdir.exclude_directory_pattern
- createdir.invalid_directory_name_msg
- createdir.allow_override
Createdoc options
- createdoc.fields
- createdoc.include_file_pattern
- createdoc.exclude_file_pattern
- createdoc.invalid_file_name_msg
- createdoc.allow_override
Authenticator options
Filesystem options
- filesystem
- filesystem.path
- filesystem.rootpath
- filesystem.datefmt
- filesystem.include_directory_pattern
- filesystem.exclude_directory_pattern
- filesystem.invalid_directory_name_msg
- filesystem.include_file_pattern
- filesystem.exclude_file_pattern
- filesystem.invalid_file_name_msg
- filesystem.extensions
- filesystem.invalid_extension
- filesystem.file_templates
- filesystem.directory_templates
- filesystem.file_event_listeners
- filesystem.readable
- filesystem.writable
- filesystem.delete_recursive
- filesystem.force_directory_template
- filesystem.allow_override
Upload options
- upload.maxsize
- upload.include_file_pattern
- upload.exclude_file_pattern
- upload.invalid_file_name_msg
- upload.extensions
- upload.invalid_extension
- upload.allow_override
Download options
Rename options
- rename.include_file_pattern
- rename.exclude_file_pattern
- rename.invalid_file_name_msg
- rename.include_directory_pattern
- rename.exclude_directory_pattern
- rename.invalid_directory_name_msg
- rename.allow_override
Local file system options
- filesystem.local.access_file_name
- filesystem.local.allow_override
- filesystem.local.file_mask
- filesystem.local.directory_mask
Stream options
ImageManager options
Directory specific configuration
MCFileManager has a special access files that can be placed in folders to control/override options. This file is by default named "mc_access" and it may contain any config option as long as it's not left out of the allow_override option.
Place a "_" character infront of option names to only override options in the current directory, so it doesn't get inherited by sub directories.
Example of a mc_access file:
# Excludes some files filesystem.exclude_file_pattern=/^(\..*)$|^filex$/i # Only for this level _filesystem.exclude_directory_pattern=/^somedir$/i # Restrict max upload file size to 5 MB upload.maxsize=5MB
Stream MIME types
Files may be streamed or downloaded with the file manager. A specific configuration file for controlling the content types of these HTTP streams are called "mime.types" this file is in the format below HTTP Content type on the left and extensions of the right. The default mime.types file contain most of the files normally used on the web but if any specific file format isn't available in this file you may easily add it by your self.
Example snippet of mime.types file:
application/msword doc dot application/pdf pdf application/pgp-signature pgp application/postscript ps ai eps
File types
File types/extensions are configurable by modifying the lookup table array located in the "file_types.php". This file contains the extension to icon, description and if it's pre viewable or not. By default most of the normally used files are included in this file and if a extension isn't located within this file a "unknown file" icon will be displayed instead. But if you want to get rid of this icon for a specific file extension you could add your own line to this file.