UploadCompleteEventArgs no definition for Files

In the docs there is this Example code for OnComplete()

Console.WriteLine($"Uploaded {args.Files.Count} files");

https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenUpload.html

But this error occurs: 'UploadCompleteEventArgs' does not contain a definition for 'Files'

I’m guessing the Files object used to be accessible but no longer is?

Hi @SkippyV

Not sure what’s changed, but if you run any of the examples, even ones where OnComplete has been included, it doesn’t seem to ever call it. Looks like OnChange is the event that should be used.

I’m sure one of the team can shed more light on this.

Regards

Paul

UploadCompleteEventArgs doesn't have a Files property - this code snippet is wrong. There never was a Files property.

The Complete event fires when files are posted to an endpoint (the Url property is set). This demo shows it firing as expected.

Perhaps my post could have been clearer. I wasn’t questioning the functioning of the Complete event. It looked like this code snippet was either outdated or incorrect. You verified it was incorrect. My post was just to point out that the code came from Radzen’s site and should be corrected.

URL of code snippet https://blazor.radzen.com/docs/api/Radzen.Blazor.RadzenUpload.html

Thanks to both for responding.

The example is fixed and later today we will upload update:

1 Like