- {errorMessages.map((error) => {
- return {error}
;
+ {errors.map((error) => {
+ switch (error.code) {
+ case ErrorCode.FileTooLarge:
+ const formattedSize = getValueFormat('decbytes')(options?.maxSize!);
+ return (
+
+ File is larger than {formattedValueToString(formattedSize)}
+
+ );
+ default:
+ return {error.message}
;
+ }
})}
@@ -209,7 +223,7 @@ export function FileDropzone({