FileRules::validFile()
Validates the extension, MIME type and filename
Parameters
Name | Type | Default | Description |
---|---|---|---|
$file * | Kirby\Cms\File |
– | |
$mime | string |null |false |
null |
If not passed, the MIME type is detected from the file, if false , the MIME type is not validated for performance reasons |
Return type
bool
Exceptions
Type | Description |
---|---|
Kirby\Exception\InvalidArgumentException |
If the extension, MIME type or filename is missing or forbidden |