Skip to content

BeechCMS


BeechCMS / @beechcms/core / isMimeAccepted

Function: isMimeAccepted() ​

isMimeAccepted(mime, accept): boolean

Checks whether a given MIME type satisfies an acceptance policy ('image' | 'document' | 'any').

Parameters ​

mime ​

string

The declared MIME string.

accept ​

FileAccept

The acceptance mode.

Returns ​

boolean

True if accepted, false otherwise.