FileField

File upload field built on Blazor’s IBrowserFile API. Supports single or multiple files, MIME/extension filtering, and enforced size limits. Works in both Blazor Server (streaming) and WebAssembly.

Basic Usage

<ArcadiaForm Model="model">
    <FileField Field="@nameof(Model.Resume)"
               Label="Upload Resume"
               Accept=".pdf,.docx"
               MaxFileSize="5242880" />
</ArcadiaForm>

Multiple Files

<FileField Field="@nameof(Model.Photos)"
           Label="Photos"
           Accept="image/*"
           Multiple="true" />

Parameters

ParameterTypeDefaultDescription
ValueIReadOnlyList<IBrowserFile>emptyCurrently selected files. Two-way bindable.
ValueChangedEventCallback<IReadOnlyList<IBrowserFile>>Fires when the selection changes.
Acceptstring?nullFile type filter (MIME types or extensions, e.g. .pdf,.docx or image/*).
MultipleboolfalseAllow selecting more than one file.
MaxFileSizelong10485760Maximum allowed file size in bytes (default 10 MB).

Inherited from FieldBase

ParameterTypeDescription
Labelstring?Visible field label.
HelperTextstring?Guidance text below the field.
RequiredboolMarks the field as required.
DisabledboolDisables user interaction.
ErrorsIReadOnlyList<string>?Validation messages to display.

Accessibility

  • Native <input type="file"> element ensures full keyboard and screen reader support
  • Error messages linked via aria-describedby
  • Required state conveyed via aria-required
  • Selected file names are announced after selection