But the demo ( Blazor FileInput Component | Free UI Components by Radzen) works for the same files (and even the "default" image shown in the example is larger, being around 45KB). I'm not talking about Megabytes-size files, I'm talking about 20-30KB.
Basically what happens is:
- If no image was selected previously, no preview is shown when selecting the large file, but the filename is shown when hovering over the button;
- If a smaller image was selected before, and you select a large one, then you click on the preview area, filename and size are updated, while the preview image is not.
This is how I call the component:
<RadzenFileInput Accept="image/*" ChooseText="Choose favicon file" @bind-Value="@ViewModel.FaviconBase64" TValue="string" Change="@FileChanged" Error=@(args => OnError(args, "FileInput"))/>
The FileChanged method is simply:
public async Task FileChanged(string _)
{
await OnChanged.InvokeAsync(true);
}