wiki:enable_various_filetype_uploads_to_mediawiki
Table of Contents
Enable various filetype uploads to MediaWiki
Add this to the end of LocalSettings.php file:
Permit upload of these files
$wgFileExtensions = array( 'py', 'sh', 'png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'mpp', 'pdf', 'ppt', 'tiff', 'bmp', 'docx', 'xlsx', 'pptx', 'ps', 'odt', 'ods', 'odp', 'odg' );
Dangerous! Don't enable on public sites. We are enabling it here to allow upload of bash scripts.
$wgVerifyMimeType = false;
See also
References
- https://www.mediawiki.org/w/index.php?title=Manual:$wgMimeTypeBlacklist&oldid=3891362
wiki/enable_various_filetype_uploads_to_mediawiki.txt · Last modified: 2020/12/17 11:05 by antisa