We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 272ce3e commit 65b744dCopy full SHA for 65b744d
src/BootstrapBlazor.Server/Components/Samples/UploadDrops.razor.cs
@@ -20,7 +20,12 @@ public partial class UploadDrops
20
private Task OnDropUpload(UploadFile file)
21
{
22
// 模拟保存文件等处理
23
- return Task.Delay(1000);
+ if (file.File is { Size: > 5 * 1024 * 1024 })
24
+ {
25
+ file.Code = 1004;
26
+ ToastService.Information("Error", Localizer["DropUploadFooterText"]);
27
+ }
28
+ return Task.CompletedTask;
29
}
30
31
private List<AttributeItem> GetAttributes() =>
0 commit comments