Hi ScottAtScorpios,
Greetings from Syncfusion support.
As per your requirement, we have prepared sample for your reference. You can start the time in BeforeUplaod event and stop in Success event and displayed in milliseconds. Please find the test sample and code snippet below for reference.
|
<div>Time for Uploading file: @actiontime ms</div>
<SfUploader ID="UploadFiles">
<UploaderAsyncSettings SaveUrl="https://ej2.syncfusion.com/services/api/uploadbox/Save" RemoveUrl="https://ej2.syncfusion.com/services/api/uploadbox/Remove">
</UploaderAsyncSettings>
<UploaderEvents BeforeUpload="onBeforeUpload" Success="UploadedSuccuessfully"></UploaderEvents>
</SfUploader>
@code {
[Inject]
protected IJSRuntime JsRuntime { get; set; }
internal Stopwatch timer = new Stopwatch();
internal string actiontime { get; set; }
public void onBeforeUpload(BeforeUploadEventArgs args)
{
timer.Restart();
}
public void UploadedSuccuessfully(SuccessEventArgs args)
{
timer.Stop();
actiontime = timer.ElapsedMilliseconds.ToString();
}
} |
Kindly check with the above sample. Please get back us if you need further assistance.
Regards,
Ponmani M