MediaWiki  master
MediaWiki\Hook\UploadForm_BeforeProcessingHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\UploadForm_BeforeProcessingHook:

Public Member Functions

 onUploadForm_BeforeProcessing ( $upload)
 This hook is called at the beginning of processUpload(). More...
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "UploadForm:BeforeProcessing" to register handlers implementing this interface.

Stable to implement

Definition at line 15 of file UploadForm_BeforeProcessingHook.php.

Member Function Documentation

◆ onUploadForm_BeforeProcessing()

MediaWiki\Hook\UploadForm_BeforeProcessingHook::onUploadForm_BeforeProcessing (   $upload)

This hook is called at the beginning of processUpload().

Lets you poke at member variables like $mUploadDescription before the file is saved. Do not use this hook to break upload processing. This will return the user to a blank form with no error message; use UploadVerifyUpload or UploadVerifyFile instead.

Since
1.35
Parameters
SpecialUpload$upload
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: