MCPcopy Create free account
hub / github.com/react-dropzone/react-dropzone / fileAccepted

Function fileAccepted

src/utils/index.js:90–99  ·  view source on GitHub ↗
(file, accept)

Source from the content-addressed store, hash-verified

88 * @returns
89 */
90export 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
101export function fileMatchSize(file, minSize, maxSize) {
102 if (isDefined(file.size)) {

Callers 2

useDropzoneFunction · 0.90
allFilesAcceptedFunction · 0.85

Calls 2

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…