MediaWiki  master
MediaWiki\Hook\FileUploadHook Interface Reference

Stable for implementation. More...

Inheritance diagram for MediaWiki\Hook\FileUploadHook:

Public Member Functions

 onFileUpload ( $file, $reupload, $hasDescription)
 This hook is called when a file upload occurs. More...
 

Detailed Description

Stable for implementation.

Definition at line 11 of file FileUploadHook.php.

Member Function Documentation

◆ onFileUpload()

MediaWiki\Hook\FileUploadHook::onFileUpload (   $file,
  $reupload,
  $hasDescription 
)

This hook is called when a file upload occurs.

Since
1.35
Parameters
File$fileImage object representing the file that was uploaded
bool$reuploadBoolean indicating if there was a previously another image there or not (since 1.17)
bool$hasDescriptionBoolean indicating that there was already a description page and a new one from the comment wasn't created (since 1.17)
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: