{{tag>mediawiki}} ====== 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 ====== * [[wiki:mediawiki_inside_docker_container|MediaWiki inside Docker container]] * [[Lock down Mediawiki]] ====== References ====== * https://stackoverflow.com/questions/21883005/upload-any-file-type-to-mediawiki * https://www.mediawiki.org/w/index.php?title=Manual:$wgMimeTypeBlacklist&oldid=3891362