Created
June 18, 2009 14:32
-
-
Save igal/131922 to your computer and use it in GitHub Desktop.
MediaWiki uploads configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Allow uploads | |
## http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads | |
$wgFileExtensions = array_merge($wgFileExtensions, array('doc', 'xls', 'mpp', 'ppt', 'pdf', 'zip')); | |
$wgEnableUploads = true; # Enable uploads | |
## http://www.mediawiki.org/wiki/Manual:Mime_type_detection | |
$wgMimeDetectorCommand = "file -bi"; | |
## Prevent users from replacing files: http://www.mediawiki.org/wiki/Manual:Configuring_file_uploads | |
$wgGroupPermissions['user']['reupload'] = false; | |
$wgGroupPermissions['autoconfirmed']['reupload'] = false; | |
## Allow users to reupload own files: http://www.mediawiki.org/wiki/Manual:User_rights | |
$wgGroupPermissions['user']['reupload-own'] = true; | |
## Fix mime detection: http://www.mediawiki.org/wiki/Manual:Mime_type_detection | |
$wgMimeDetectorCommand = "file -bi"; | |
## Fix blacklist to allow .zip files | |
function notApplicationZipFilter ($kind) { return($kind != "application/zip"); } | |
$wgMimeTypeBlacklist = array_filter($wgMimeTypeBlacklist, "notApplicationZipFilter"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment