Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F2753462
UploadVerifyFileHook.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
UploadVerifyFileHook.php
View Options
<?php
namespace
MediaWiki\Hook
;
use
UploadBase
;
use
Wikimedia\Message\MessageSpecifier
;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "UploadVerifyFile" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface
UploadVerifyFileHook
{
/**
* Use this hook to perform extra file verification, based on MIME type, etc.
*
* @since 1.35
*
* @param UploadBase $upload Instance of UploadBase, with all info about the upload
* @param string $mime Uploaded file's MIME type, as detected by MediaWiki.
* Handlers will typically only apply for specific MIME types.
* @param bool|array|MessageSpecifier &$error Output: true if the file is valid.
* Otherwise, set this to the reason in the form of [ messagename, param1, param2, ... ]
* or a MessageSpecifier instance. (You might want to use ApiMessage to provide machine
* -readable details for the API.)
* @return bool|void True or no return value to continue or false to abort
*/
public
function
onUploadVerifyFile
(
$upload
,
$mime
,
&
$error
);
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Jul 3, 21:17 (22 h, 10 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
17/a8/3f03163c3beb6a009c4232ebd11a
Default Alt Text
UploadVerifyFileHook.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment