Allow zipfile and 7zip uploads

From Richard's Wiki
(Redirected from Allow zipfile uploads)
Jump to: navigation, search

Edit LocalSettings.php:

 $wgFileExtensions[] = 'zip';
 $wgFileExtensions[] = '7z';

This adds ".zip" and ".7z" to allowed media: uploads array, as well as retaining the default .png, .gif, .jpg etc.

For version 1.17, had to add the following to LocalSettings.php, to allow zip uploads:

 $wgMimeTypeBlacklist = array_diff($wgMimeTypeBlacklist, array(
       'application/zip'
 ));