matchesAccept
function matchesAccept(file, accept): boolean;Whether a file satisfies an accept string.
Follows the HTML spec’s three forms, and is deliberately lenient about a
missing MIME type: browsers report '' for plenty of real files (anything
the OS has no association for), and refusing those would reject files the
native picker itself offered. When the type is unknown, only the extension
can decide.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
file | File |
accept | string | undefined |
Returns
Section titled “Returns”boolean