Progressbar with Await method execution time

Hello,

Here I am posting my code with a new thread. Please check the code.  

THE OLD THREAD WAS   "https://www.syncfusion.com/forums/173216/show-progressbar-while-uploading-images-using-sync-method " But I did not get a reply from your side.

So,  

Here is my ajax CALL actual Code when I click on the button OKCLICKINSERT() function will be called.

document.getElementById("dialogBtn").onclick = function () {

        ej.popups.DialogUtility.confirm({

            title: ' Confirmation Dialog',

          content: "Are you sure you want to upload images into Azure and Update DB",

            okButton: {

                text: 'OK', click: function () {

                    okClickInsert();

                    this.hide();

                } },

            cancelButton: { text: 'Cancel', click: ClickTest },

            showCloseIcon: true,

            closeOnEscape: true,

            animationSettings: { effect: 'Zoom' }

        });

    };

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.

PLEASE GIVE EXACT SOLUTION for my problem, not the random Example.


PLEASE  HELP me I am stuck here and my project submission is tomorrow that is why I working on SUNDAY. Please give me the proper solution. 

I can do the same task with out synfusion progress bar but my client prefers to use Synfusion Controller I did not get the solution. 



5 Replies

DG Durga Gopalakrishnan Syncfusion Team March 7, 2022 12:58 PM UTC

Hi Veet, 

We have prepared sample to update the progress bar value using ajax request. As per your requirement, the time required for uploading the file needs to be calculated from your end, then value is assigned for progress bar and update it using refresh method. 


If the provided solution doesn’t meet your requirement, please revert us. 

Regards, 
Durga G 



VE Veet replied to Durga Gopalakrishnan March 15, 2022 01:47 PM UTC

You have provided me the code in which Using Ajax calls to display the VIEW BAG value in the progress bar. 

Correct? 

But my View bag value changed based on the Azure Blob Storage uploading process.

How Can I get the uploading status through View bag to synfusion Progressbag??? 



DG Durga Gopalakrishnan Syncfusion Team March 16, 2022 02:19 PM UTC

Hi Veet, 

We are clear about your exact query. Please share us your requirement in details and image or video reference to check this case from our end and share the details which Syncfusion controls you are using along with progress bar. Whether you are uploading the files using uploader control?  

Regards, 
Durga G. 



VE Veet replied to Durga Gopalakrishnan March 16, 2022 09:08 PM UTC

Hello

Durga, 


I have sent a mail, in which, I have specified my exact problem including my code.

Please check the mail

Email Address: - [email protected] and

Subject:- Syncfusion Forum [173418] has a new reply - Progressbar with Await method execution time.


I can not share all my code here in the public domain.


Thanks 




DG Durga Gopalakrishnan Syncfusion Team March 17, 2022 10:13 AM UTC

Hi Veet, 
 
We request you to follow the created ticket to get further updates regarding this query. Please let us know if you have any concerns. 

Regards, 
Durga G. 


Loader.
Up arrow icon