Manual:Hooks/UploadVerification
From MediaWiki.org
| UploadVerification | |
|---|---|
| Available from version 1.6.0 Called when a file is uploaded, to allow extra file verification to take place |
|
Define function: |
public static function onUploadVerification( $saveName, $tempName, &$error ) { ... }
|
Attach hook: |
$wgHooks['UploadVerification'][] = 'MyExtensionHooks::onUploadVerification'; |
| Called from: | SpecialUpload.php, UploadBase.php |
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:UploadVerification extensions.
[edit] Details
- $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)
