Available from version 1.31.0
After the initial page text for file uploads is generated, to allow it to be altered.
Define function:
public static function onUploadForm_getInitialPageText( string &$pageText, array $msg, Config $config ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"UploadForm:getInitialPageText": "MyExtensionHooks::onUploadFormgetInitialPageText"
Called from:File(s): specials/SpecialUpload.php
Function(s): getInitialPageText

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


  • &$pageText: the page text
  • $msg: array of header messages
  • $config: Config object