Manual:Hooks/FileUpload

From MediaWiki.org
Jump to: navigation, search
FileUpload
Available from version 1.11.0
Fires when a local file upload occurs.

*Define function:
function fnMyHook( $file ) { ... }

*Attach hook:
$wgHooks['FileUpload'][] = 'MyExtensionHooks::someExample';
Called from: LocalFile.php

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


[edit] Details

$file - The LocalFile object.

The return value of this hook is ignored.

Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox