Manual:Hooks/FileUpload
Appearance
From mediawiki.org
| FileUpload | |
|---|---|
| Available from version 1.11.0 Fires when a local file upload occurs. | |
| Define function: | public static function onFileUpload( $file ) { ... } |
| Attach hook: | In extension.json:
{ "Hooks":{ "FileUpload":"MediaWiki\\Extension\\MyExtension\\Hooks::onFileUpload" } } |
| Called from: | File(s): LocalFile.php |
| Interface: | FileUploadHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:FileUpload extensions.
Details
[edit ]$file - The LocalFile object.
The return value of this hook is ignored.