TurnKey Linux Virtual Appliance Library

Enabling file uploads other than pictures in MediaWiki

Rykeer's picture

 Hello all,

We recently setup a MediaWiki server and are trying to configure it to allow us to upload other types of files, i.e. txt, .pdf, .doc, etc.  I've looked through the various articles on Mediawiki's site  (http://www.mediawiki.org/wiki/Configuring_file_uploads), but I'm confused--I can't seem to locate the correct .php or .ini file.  I am relatively new to Linux, been playing with various versions off and on for several years, but never to any real depth.  Is there a way to change this through Webmin, or how would I go about doing this?

We are currently using the latest build from this site.

Thanks in advance.

Alon Swartz's picture

Mediawiki configuration files are located in /etc/mediawiki

You are looking for the configuration file:
I took a quick look at the link you mentioned, and most likly the only change you need to make is adding the filetypes you require to the configuration, for example:
$wgFileExtensions = array_merge($wgFileExtensions, array('txt', 'pdf', 'doc'));
Good luck!
Rykeer's picture

Mediawiki configuration files are located in /etc/mediawiki

Thanks alon for the reply. So do I need to place that line in a particular location in the .php file, or just add it at the end? I'm not actually finding a section for this, except for image uploads. Thanks again.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)