MediaWiki: Difference between revisions
| Line 55: | Line 55: | ||
** <code>$wgEnableUploads = true;</code> | ** <code>$wgEnableUploads = true;</code> | ||
* Support uploading non-images: <tt>sudoedit /etc/mediawiki/LocalSettings.php</tt> and add | * Support uploading non-images: <tt>sudoedit /etc/mediawiki/LocalSettings.php</tt> and add | ||
** < | ** <pre>$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'doc', 'pdf', 'ps', 'xls', 'txt', 'svg' );</pre> | ||
** Supposedly, all types can be allowed via:< | ** Supposedly, all types can be allowed via: | ||
<pre> | |||
$wgCheckFileExtensions = false; | $wgCheckFileExtensions = false; | ||
$wgStrictFileExtensions = false; | $wgStrictFileExtensions = false; | ||
$wgVerifyMimeType = false; | $wgVerifyMimeType = false; | ||
$wgFileBlacklist = array(); | $wgFileBlacklist = array(); | ||
$wgMimeTypeBlacklist= array();</ | $wgMimeTypeBlacklist= array(); | ||
</pre> | |||
* To allow files larger than the default 2M to be uploaded, edit the value of <tt>upload_max_filesize</tt> in <tt>/etc/php.ini</tt> | * To allow files larger than the default 2M to be uploaded, edit the value of <tt>upload_max_filesize</tt> in <tt>/etc/php.ini</tt> | ||
** This requires a web server restart to take effect | ** This requires a web server restart to take effect | ||