Available from version 1.16.0
When UploadBase::createFromRequest has been called
Define function:
public static function onUploadCreateFromRequest( $type, &$className ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"UploadCreateFromRequest": "MyExtensionHooks::onUploadCreateFromRequest"
Called from: File(s): UploadBase.php
Interface: UploadCreateFromRequestHook.php

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


  • $type: string: the requested upload type
  • &$className: the class name of the Upload instance to be created