Drop and picker selection share the same extension, size, and count validation behavior. Configure validation-message templates with {FileName}, {MaxFileSize}, {AllowedFileTypes}, or {MaxFileCount} where applicable; the single-file message is static.
Drop files here or tap to browseSelect up to three PDF or PNG files, each no larger than 1 MB.
<DragAndDropFileInput Multiple="true"
MaxFileCount="3"
MaxFileSize="1048576"
AllowedFileTypes="@allowedFileTypes"
InvalidFileTypeErrorMessage="{FileName} must use one of: {AllowedFileTypes}."
MaxFileCountErrorMessage="{FileName} would exceed the {MaxFileCount}-file limit."
MaxFileSizeErrorMessage="{FileName} exceeds the {MaxFileSize}-byte limit."
SingleFileErrorMessage="Select only one file."
HintText="Select up to three PDF or PNG files, each no larger than 1 MB." />
@code {
private readonly string[] allowedFileTypes = [".pdf", "png"];
}