Rxova
Skip to content

FileRules

optional accept?: string;

Comma-separated accept string, exactly as <input accept> takes it: extensions (.png), full types (image/png), and wildcards (image/*).


optional dedupe?: boolean;

Treat two files with the same name, size and timestamp as the same file.

true

optional maxFiles?: number;

Maximum number of files.


optional maxSize?: number;

Largest allowed file, in bytes.


optional minSize?: number;

Smallest allowed file, in bytes. Catches the 0-byte file a failed copy leaves behind.


optional validate?: (file, existing) => string | boolean;

Final say. Return true, false, or a string explaining the refusal.

ParameterType
fileFile
existingFile[]

string | boolean