From 5bc1bd0e81d188e0c798f965607031e38a2560e0 Mon Sep 17 00:00:00 2001 From: NickLocke Date: Thu, 14 Aug 2025 07:59:34 +0100 Subject: [PATCH 1/2] Update LocalSettings.php - allow upload of DOCX files. --- public_wiki/LocalSettings.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public_wiki/LocalSettings.php b/public_wiki/LocalSettings.php index 79c90a7..41791cb 100644 --- a/public_wiki/LocalSettings.php +++ b/public_wiki/LocalSettings.php @@ -187,7 +187,7 @@ $wgImageMagickConvertCommand = "/usr/bin/convert"; # File Extensions allowed for upload -$wgFileExtensions = array('png', 'gif', 'pde', 'jpg', 'jpeg', 'pdf', 'sh3d', 'psd', 'svg', 'zip', 'odp', 'pem', 'key', 'mp4', 'm4v', 'odt', 'ods', 'odg'); +$wgFileExtensions = array('png', 'gif', 'pde', 'jpg', 'jpeg', 'pdf', 'sh3d', 'psd', 'svg', 'zip', 'odp', 'pem', 'key', 'mp4', 'm4v', 'odt', 'ods', 'odg', 'docx'); #If issues with JavaScript fasle positive uncomment # $wgAllowTitlesInSVG = true; @@ -213,6 +213,10 @@ 'application/x-opc+zip', ); +# explicitly allow the MIME type for DOCS files. This is a recommended but optional setting. However, given the +# list of explicit blocks above, it seems sensible to add it. +$wgTrustedMediaFormats[] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'; + /* +------------------------------+ | NAMESPACE SETTINGS | From f664f9d8ae674477ba312eb43f17cc2fb6f280e0 Mon Sep 17 00:00:00 2001 From: NickLocke Date: Thu, 14 Aug 2025 08:06:40 +0100 Subject: [PATCH 2/2] Update LocalSettings.php - fixed typo. --- public_wiki/LocalSettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_wiki/LocalSettings.php b/public_wiki/LocalSettings.php index 41791cb..53067f4 100644 --- a/public_wiki/LocalSettings.php +++ b/public_wiki/LocalSettings.php @@ -213,7 +213,7 @@ 'application/x-opc+zip', ); -# explicitly allow the MIME type for DOCS files. This is a recommended but optional setting. However, given the +# explicitly allow the MIME type for DOCX files. This is a recommended but optional setting. However, given the # list of explicit blocks above, it seems sensible to add it. $wgTrustedMediaFormats[] = 'application/vnd.openxmlformats-officedocument.wordprocessingml.document';