MediaWiki fundraising/REL1_35
|
Stable to implement. More...
Public Member Functions | |
onUploadVerifyFile ( $upload, $mime, &$error) | |
Use this hook to perform extra file verification, based on MIME type, etc. | |
Stable to implement.
Definition at line 12 of file UploadVerifyFileHook.php.
MediaWiki\Hook\UploadVerifyFileHook::onUploadVerifyFile | ( | $upload, | |
$mime, | |||
& | $error ) |
Use this hook to perform extra file verification, based on MIME type, etc.
UploadBase | $upload | Instance of UploadBase, with all info about the upload |
string | $mime | Uploaded file's MIME type, as detected by MediaWiki. Handlers will typically only apply for specific MIME types. |
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.) |
Implemented in MediaWiki\HookContainer\HookRunner.