We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

File Upload not sending files to controller

My Blazor app is a client-side app. Using .NET 6.0. Syncfusion v19.4.0.56. I have the following code on my razor page...

<SfUploader AllowedExtensions=".txt" AllowMultiple="false" AutoUpload="true">
     <UploaderAsyncSettings SaveUrl="@_uploadUrl"></UploaderAsyncSettings>

My Controller code looks like this...

public async Task<IActionResult> UploadQueryFileAsync(IList<IFormFile> UploadFiles)

From what I can tell everything looks the same as in your example. I have a breakpoint at the very beginning of this method and this method is being executed, except the UploadFiles parameter is empty (Count = 0).

What am I doing wrong?

2 Replies

GE Gene November 22, 2022 03:52 PM

Never mind...I figured it out...I had to put the ID='UploadFiles" on the SFUploader.  Crazy!  I spent days on this!

SS Shereen Shajahan Syncfusion Team November 23, 2022 12:49 AM

Glad that your issue has been solved. Please get back to us for further assistance.

Live Chat Icon For mobile
Up arrow icon