Manual:Hooks/UploadVerification
Jump to navigation
Jump to search
![]() | This feature was removed from MediaWiki core in version 1.34.0 (after being deprecated in 1.28.0). Please see UploadVerifyFile for an alternative way to use this feature. |
UploadVerification | |
---|---|
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 |
Interface: | UploadVerificationHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UploadVerification extensions.
Details[edit]
$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)