How do I allow uploading of additional formats

From PaulGuWiki

Jump to: navigation, search

MediaWiki requires that allowed file upload formats are specified using the $wgFileExtensions configuration directive. Usually this directive is situated in LocalSettings.php in the root of your MediaWiki installation.


For example, to allow uploading of PDF files, add the following to LocalSettings.php:

$wgFileExtensions[] = 'pdf';


Note Note: The syntax is different to allow uploading of more than one type of file. To do so, use an array as in the example below which will allow uploading of png, gif, jpg, jpeg, pdf, and txt files.

$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt' );


modified on 7 April 2009 at 22:29 ••• total 1,376 views ••• Top