Manual:Hooks/UploadForm:BeforeProcessing

From MediaWiki.org
Jump to: navigation, search
UploadForm:BeforeProcessing
Available from version 1.9.0
Called just before the upload data, like wpUploadDescription, are processed, so extensions get a chance to manipulate them.

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

*Attach hook:
$wgHooks['UploadForm:BeforeProcessing'][] = 'MyExtensionHooks::someExample';
Called from: SpecialUpload.php

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


[edit] Details

  • $uploadFormObj: current UploadForm object

The hook function must return true (or at least something which doesn't evaluate as false). Otherwise, nothing happens, without any message to the user (unless the hook function itself takes care of that).

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