Available from version 1.16.0
Occurs after the descriptor for the upload form as been assembled.
Define function:
public static function onUploadFormInitDescriptor( $descriptor ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"UploadFormInitDescriptor": "MediaWiki\\Extension\\MyExtension\\Hooks::onUploadFormInitDescriptor"
Called from: File(s): specials/SpecialUpload.php
Interface: UploadFormInitDescriptorHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UploadFormInitDescriptor extensions.

Details edit

  • $descriptor: the HTMLForm descriptor