Skip to content

Kirby 6.0.0

$fileValidators->validateFile()

Validates the extension, MIME type and filename

$fileValidators->validateFile(string|false|null $mime = null): void

Parameters

Name Type Default Description
$mime stringorfalseornull null If not passed, the MIME type is detected from the file, if false, the MIME type is not validated for performance reasons

Parent class

Kirby\Guards\FileValidators