Radzen Blazor Studio alpha is available! Get Now

FileInput (Blazor)

This article demonstrates how to use the FileInput component. Check also the component guide and API reference.

The FileInput component is used to upload files as a part of a TemplateForm component. Files are uploaded as Data URI to be saved in a database table.

FileInput Properties

Name Type Default Description
Name string ‘fileInput’ + index suffix Unique name of the upload.
Accept string image/* Accepted files filter.
Value string null File contents as a Data URI. Will preview an image if set to an image Data URI.
Disabled boolean/expression false Is FileInput disabled.
Visible boolean/expression true Is FileInput visible.
Style string null In-line CSS style.
ImageStyle string null In-line CSS style for the image.

FileInput Events

Name Type Default Description
Change event null The event argument is the file data as a Data URI string.
Error event null Error message.

For more info about event actions please visit event actions in our documentation.

Blazor declaration

<RadzenFileInput Value="@firstEmployee.Photo" Change="@FileInputChanged" />

We are here for you

Making our users happy is always a priority for us.