Skip to content

Kirby 3.7.5

FileRules::validMime()

Validates the MIME type

FileRules::validMime(Kirby\Cms\File $file, string $mime = null): bool

Parameters

Name Type Default
$file * Kirby\Cms\File
$mime string null

Return type

bool

Exceptions

Type Description
Kirby\Exception\InvalidArgumentException If the MIME type is missing or forbidden

Parent class

Kirby\Cms\FileRules