Skip to content

@serenity-is/corelib / UploadHelper / checkImageConstraints

Function: checkImageConstraints()

checkImageConstraints(file, opt): boolean

Defined in: src/ui/helpers/uploadhelper.tsx:91

Checks an uploaded file against the given image constraints, notifying the user of any violation.

Parameters

file

UploadResponse

The uploaded file response.

opt

FileUploadConstraints

The constraints to check against.

Returns

boolean

True if the file satisfies all constraints, otherwise false.