DxUpload.FileUploaded Event
Fires when a file was uploaded.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v26.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public EventCallback<FileUploadEventArgs> FileUploaded { get; set; }
Event Data
The FileUploaded event's data class is FileUploadEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| FileInfo | Returns information about a file. |
Remarks
The FileUploaded event fires after a file was uploaded to the server. Otherwise, the DxUpload component raises the FileUploadError event.
Note that the following code snippet uses Bootstrap classes. To render elements correctly, enable the UseBootstrapStyles option in theme settings.
<DxUpload Name="myFile"
UploadUrl="https://localhost:10000/api/Upload/Upload/"
FileUploaded="@OnFileUploaded" />
<div class="alert alert-info @(MessageVisible? " visible" : " invisible")">
@MyMessage
</div>
@code {
bool MessageVisible { get; set; } = false;
string MyMessage { get; set; } = "";
void OnFileUploaded(FileUploadEventArgs e) {
MyMessage = "The " + e.FileInfo.Name + " file was uploaded.";
MessageVisible = true;
InvokeAsync(StateHasChanged);
}
}

See Also