Skip to content

FileAttempt

The outcome of trying to accept one file. What attempt actually returns is one of the two narrower shapes below, so checking accepted is enough to know whether reason is set.

accepted: boolean;

file: File;

optional message?: string;

A human-readable reason, when validate supplied one.


optional reason?: FileRejection;