< Manual:Hooks
| 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": "MyExtensionHooks::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
$file - The LocalFile object.
The return value of this hook is ignored.
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.