<FileUpload />
+
+<FileUpload Accept="image/*" />
+
+<FileUpload AllowMultiple="true" />
+
+<FileUpload Enabled="false" />
+
+<FileUpload Width="Unit.Pixel(380)" BackColor="WebColor.Lavender" />
+
+@code {
+ FileUpload _basicFileControl, _imageFileControl, _multiFileControl;
+ string _basicStatusText, _imageStatusText, _multiStatusText;
+
+ void CheckBasicFile() => _basicStatusText = "Basic file control clicked";
+ void CheckImageFile() => _imageStatusText = "Image control clicked";
+ void CheckMultiFiles() => _multiStatusText = "Multi-file control clicked";
+}
From 3357d71ecad8cada3d106038cf1aba0ed88aed1f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 9 Feb 2026 17:45:15 +0000
Subject: [PATCH 4/8] Address code review feedback - improve security and async
patterns
Co-authored-by: csharpfritz <78577+csharpfritz@users.noreply.github.com>
---
src/BlazorWebFormsComponents/FileUpload.razor | 4 +--
.../FileUpload.razor.cs | 26 ++++++++++++++++---
2 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/BlazorWebFormsComponents/FileUpload.razor b/src/BlazorWebFormsComponents/FileUpload.razor
index 3827c5a4..8c1b97ea 100644
--- a/src/BlazorWebFormsComponents/FileUpload.razor
+++ b/src/BlazorWebFormsComponents/FileUpload.razor
@@ -4,11 +4,11 @@
{
}
diff --git a/src/BlazorWebFormsComponents/FileUpload.razor.cs b/src/BlazorWebFormsComponents/FileUpload.razor.cs
index 6c4abf2a..d0d832b6 100644
--- a/src/BlazorWebFormsComponents/FileUpload.razor.cs
+++ b/src/BlazorWebFormsComponents/FileUpload.razor.cs
@@ -38,6 +38,22 @@ public partial class FileUpload : BaseStyledComponent
/// Gets the contents of the uploaded file as a byte array.
/// For multiple files, returns the first file's content.
///
+ public async Task