Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4171531
FileUploadHook.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
846 B
Referenced Files
None
Subscribers
None
FileUploadHook.php
View Options
<?php
namespace
MediaWiki\Hook
;
use
File
;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "FileUpload" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface
FileUploadHook
{
/**
* This hook is called when a file upload occurs.
*
* @since 1.35
*
* @param File $file Image object representing the file that was uploaded
* @param bool $reupload Boolean indicating if there was a previously another image there or
* not (since 1.17)
* @param bool $hasDescription Boolean indicating that there was already a description page
* and a new one from the comment wasn't created (since 1.17)
* @return bool|void True or no return value to continue or false to abort
*/
public
function
onFileUpload
(
$file
,
$reupload
,
$hasDescription
);
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 20 2026, 06:18 (11 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
a5/1d/52a5aba985cbab2bdd033cc092e9
Default Alt Text
FileUploadHook.php (846 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment