Available from version 1.6.0
Removed in version 1.34.0
Called when a file is uploaded, to allow extra layers of verification for a file to take place
Define function:
public static function onUploadVerification( string $saveName, string $tempName, string &$error ) { ... }
Attach hook:

In extension.json:

	"Hooks": {
		"UploadVerification": "MyExtensionHooks::onUploadVerification"
Called from:File(s): upload/UploadBase.php

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


  • $saveName: destination file name (string)
  • $tempName: filesystem path to the temporary file for checks (string)
  • &$error: output: HTML error to show if upload canceled by returning false (string)