Skip to main content

DxUpload.FileReloaded Event

Fires when a file is reloaded.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

Declaration

[Parameter]
public EventCallback<FileReloadedEventArgs> FileReloaded { get; set; }

Event Data

The FileReloaded event's data class is FileReloadedEventArgs. The following properties provide information specific to this event:

Property Description
NewFileInfo Contains information about the reloaded file.
OldFileInfo Contains information about the file before the reload.

Remarks

The FileReloaded event occurs after a user reloads a file whose upload was canceled. Users can cancel file upload if the AllowCancel property is set to true.

<DxUpload Name="myFile" UploadUrl="https://localhost:10000/api/Upload/UploadFile/" 
          FileReloaded="@OnFileReloaded">
</DxUpload>
<div class="alert alert-info @(MessageVisible? " visible" : " invisible")">@MyMessage</div>

@code {
    bool MessageVisible { get; set; } = false;
    string MyMessage { get; set; } = "";

    void OnFileReloaded(FileReloadedEventArgs args) {
        MyMessage = "The " + args.NewFileInfo.Name + " file was reloaded.";
        MessageVisible = true;
        InvokeAsync(StateHasChanged);
    }
}

Upload File Reloaded

See Also