]> scripts.mit.edu Git - www/raw.git/blob - faq/61.mdwn
Import from TextPattern
[www/raw.git] / faq / 61.mdwn
1 [[!meta title="How do I enable file uploads to my MediaWiki?"]]
2 To enable uploads, edit the LocalSettings.php file in your
3 MediaWiki install directory, and change the line reading
4 `$wgEnableUploads = false;` to `$wgEnableUploads = true;`.
5
6 MediaWiki by default allows uploads of images with the following
7 extensions: png, gif, jpg, and jpeg. To upload more file types, you
8 will also need to add lines such as
9
10     $wgFileExtensions[] = 'doc';
11     $wgFileExtensions[] = 'pdf';
12
13 for each extension (.doc and .pdf in this example) you would like
14 to allow your site to upload. You can add these lines anywhere
15 after the line starting with **require\_once** and before the
16 **?\>** at the end of the file.
17
18 Certain file types, such as .zip, cannot be properly uploaded with
19 the default file-type detection system. If you have problems
20 uploading certain file types, you may need to use an additional
21 file-type detector, named “file”, with this command:
22
23     $wgMimeDetectorCommand = 'file -bi';
24
25 If you run into trouble, please check the
26 [MediaWiki web site](http://www.mediawiki.org/) or contact
27 [scripts@mit.edu](http://scripts.mit.edu/scripts@mit.edu).
28
29
30