diff --git a/src/Core/Components/InputFile/FluentInputFile.razor.cs b/src/Core/Components/InputFile/FluentInputFile.razor.cs index cf9cdf1229..648abbd005 100644 --- a/src/Core/Components/InputFile/FluentInputFile.razor.cs +++ b/src/Core/Components/InputFile/FluentInputFile.razor.cs @@ -403,7 +403,7 @@ private async Task ReadFileToBufferAndRaiseProgressEventAsync(IBrowserFile file, private Task UpdateProgressAsync(long current, long size, string title) { - return UpdateProgressAsync(Convert.ToInt32(decimal.Divide(current, size) * 100), title); + return UpdateProgressAsync(Convert.ToInt32(decimal.Divide(current, size <= 0 ? 1 : size) * 100), title); } private async Task UpdateProgressAsync(int percent, string title)