File::isMimeType( string $type ): bool

In this article

Checks if the file is a specific MIME type.

Parameters

$typestringrequired
The mime type to check (e.g. 'image', 'text', 'video', 'audio').

Return

bool True if the file is of the specified type.

Source

public function isMimeType(string $type): bool
{
    return $this->mimeType->isType($type);
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.