Hello,
I am uploading my Images and Videos into Azure blog storage using Async and Await method. I am performing this task when the user clicks on the button confirmation.
function okClickInsert () {
//Other Code
$.ajax({
url: "@URL .Action("UploadFilesinAzure", "UploadFiles")",
data: JSON.stringify(UPLOADToAzure),
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
beforeSend: onProgress,
complete: onComplete,
success: function (data) {
location.reload();
},
error: function (data) { }
});
}
Now the method " UploadFilesinAzure " is TYPE OF ASYNC AND AWAIT.
[HttpPost]
public async Task UploadFilesinAzure( Frombody]... ){
//Other validation code
await DoUploadFileOnlyAsync(FILE Details);
}
During the execution of UploadFilesinAzure() I want to calculate the time and show me the progress bar.
DoUploadFileOnlyAsync() :- Method contains all the AZURE BLOG STORAGE code.
How to