Skip to content

Kirby 3.9.8

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 null

Return type

bool

Exceptions

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

Parent class

Kirby\Cms\FileRules