(file, accept)
| 88 | * @returns |
| 89 | */ |
| 90 | export function fileAccepted(file, accept) { |
| 91 | const isAcceptable = |
| 92 | file.type === "application/x-moz-file" || |
| 93 | accepts(file, accept) || |
| 94 | isDataTransferItemWithEmptyType(file); |
| 95 | return [ |
| 96 | isAcceptable, |
| 97 | isAcceptable ? null : getInvalidTypeRejectionErr(accept), |
| 98 | ]; |
| 99 | } |
| 100 | |
| 101 | export function fileMatchSize(file, minSize, maxSize) { |
| 102 | if (isDefined(file.size)) { |
no test coverage detected
searching dependent graphs…