Skip to content

Commit

Permalink
Fixed FileInput error when canceled
Browse files Browse the repository at this point in the history
Fix #1720
  • Loading branch information
enchev committed Oct 1, 2024
1 parent 10bbf6b commit 8ac137f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Radzen.Blazor/RadzenFileInput.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ async Task OnChange()
[JSInvokable("RadzenUpload.OnChange")]
public async System.Threading.Tasks.Task OnChange(IEnumerable<PreviewFileInfo> files)
{
if(files == null || !files.Any())
{
return;
}

var file = files.FirstOrDefault();

FileSize = file.Size;
Expand Down

0 comments on commit 8ac137f

Please sign in to comment.