commit 9924dd21bc6a03459528eb3df79e2069840e790d
parent d5dd67491c9a6a632d1e7ed98ac8ab1829750ef0
Author: MTRNord <MTRNord@users.noreply.github.com>
Date: Wed, 22 Apr 2026 11:38:54 +0200
install upload wizard
Signed-off-by: MTRNord <MTRNord@users.noreply.github.com>
Diffstat:
2 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/apps/talos_cluster/mediawiki/Dockerfile b/apps/talos_cluster/mediawiki/Dockerfile
@@ -27,6 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends git \
JsonConfig \
Translate \
UniversalLanguageSelector \
+ UploadWizard \
; do \
git clone --depth 1 --branch REL1_45 \
"https://gerrit.wikimedia.org/r/mediawiki/extensions/${EXT}" \
diff --git a/apps/talos_cluster/mediawiki/configmap.yaml b/apps/talos_cluster/mediawiki/configmap.yaml
@@ -36,9 +36,49 @@ data:
# File uploads
$wgEnableUploads = true;
+ $wgUseImageMagick = true;
$wgUploadPath = "/images";
$wgUploadDirectory = "/var/www/html/images";
$wgMaxUploadSize = 50 * 1024 * 1024; # 50 MB
+ $wgUseInstantCommons = true;
+ wfLoadExtension( 'UploadWizard' );
+
+ $wgUploadWizardConfig = array(
+ 'debug' => false,
+ 'altUploadForm' => 'Special:Upload',
+ 'licenses' => array(
+ 'cc-by-nc-sa-4.0' => [
+ 'msg' => 'mwe-upwiz-license-cc-by-nc-sa-4.0',
+ 'icons' => [ 'cc-by', 'cc-nc', 'cc-sa' ],
+ 'url' => '//creativecommons.org/licenses/by-nc-sa/4.0/',
+ 'languageCodePrefix' => 'deed.'
+ ],
+ ),
+
+ 'licensing' => array(
+ 'defaultType' => 'ownwork',
+ 'ownWorkDefault' => 'choice',
+ 'ownWork' => array(
+ 'type' => 'or',
+ 'template' => 'self',
+ 'defaults' => 'cc-by-nc-sa-4.0',
+ 'licenses' => array(
+ 'cc-by-nc-sa-4.0',
+ 'cc-by-sa-4.0',
+ 'cc-by-sa-3.0',
+ 'cc-by-4.0',
+ 'cc-by-3.0',
+ 'cc-zero'
+ )
+ ),
+ ),
+ );
+
+ // Needed to make UploadWizard work in IE, see https://phabricator.wikimedia.org/T41877
+ $wgApiFrameOptions = 'SAMEORIGIN';
+
+ $wgUploadNavigationUrl = '/wiki/Special:UploadWizard';
+
# Logo / favicon (update after initial setup)
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
@@ -176,8 +216,6 @@ data:
$wgDefaultUserOptions['usenewrc'] = 1;
- $wgUseInstantCommons = true;
-
# === Parser & Template Extensions ===
wfLoadExtension('ParserFunctions');
wfLoadExtension('Scribunto');