<RadzenCard Variant="Variant.Outlined">
    <RadzenUpload 
        ChooseText="Upload a single file as form data"
        Url="upload/single" 
        Style="width: 100%"
        Progress=@OnProgress 
        Complete=@OnComplete
        InputAttributes="@(new Dictionary<string,object>{ { "aria-label", "select file" }})" />
    <RadzenUpload
        ChooseText="Upload a single file as stream"
        Url="upload/stream" 
        Method="PUT"
        Stream="true"
        Multiple="false"
        Style="width: 100%"
        Progress=@OnProgress 
        Complete=@OnComplete
        InputAttributes="@(new Dictionary<string,object>{ { "aria-label", "select file" }})" />
</RadzenCard>
<EventConsole @ref=@console />

@code {
    EventConsole console;

    void OnComplete(UploadCompleteEventArgs args)
    {
        console.Log($"Upload complete with server response: {args.RawResponse}");
    }

    void OnProgress(UploadProgressArgs args)
    {
        console.Log($"Upload progress: {args.Progress}% / {args.Loaded} of {args.Total} bytes.");

        if (args.Progress == 100)
        {
            foreach (var file in args.Files)
            {
                console.Log($"Uploaded: {file.Name} / {file.Size} bytes");
            }
        }
    }
}