How to Access Progress Bar in Controller Action Result

On my CSHTML page, I have File Upload Option. 

When I click on the Button. I HAVE TO PHYSICAL *.MP4 file in MY AZURE. 

During this uploading process, I have to show, that your video uploading is in process. 

Can you please provide me, HOW I CAN PERFORM THIS TASK? 

MY .CSHTML PAGE

 <div class="row" style="border:1px solid black; border-bottom:none;" id="videoFolderDiv" name="videoFolderDiv">
        <div class="col-md-7">
            <div class="form-group">
                <label class="text-primary">Video Folder:</label>
                <div class="form-check">
                    <input class="form-control" type="file" asp-for="formFileVideo">
                    <label class="form-check-label" for="formFile">Select MP4 Videos</label>
                </div>
                <span class="text-danger"></span>
            </div>
        </div>
    </div>

<button type="submit" />

MY CONTROLLER CODE 

public async Task<IActionResult> Index(MY MODEL){
......

await UploadVideoToAzureAsync();

}

Here UploadVideoToAzureAsync(), upload my PHYSICAL  *.MP4 video in AZURE. During this time period I WANT TO SHOW THE PROGRESS BAR. 


5 Replies

DG Durga Gopalakrishnan Syncfusion Team February 3, 2022 02:59 PM UTC

Hi Harshida, 
 
Greetings from Syncfusion. 
 
We have prepared chart sample in which progress bar will be displayed before loading the chart and it will be hidden after chart is loaded. We have achieved this using chart load and loaded events. We suggest you to load the progress bar based on your need. Please check with the below sample. 
 
<ejs-chart id="container" load="onChartLoad" loaded="loadedChart"></ejs-chart> 
<div id="loader"> 
    <ejs-progressbar id="linearindeterminate"></ejs-progressbar> 
</div> 
<script> 
    function onChartLoad(args) { 
        document.querySelector("body").style.visibility = "hidden"; 
        document.querySelector("#loader").style.visibility = "visible"; 
    } 
    function loadedChart(args) { 
        document.querySelector("#loader").style.display = "none"; 
        document.querySelector("body").style.visibility = "visible"; 
    }; 
</script> 
 
 
Kindly revert us if you have any concerns. 
 
Regards, 
Durga G 



HP Harshida Parmar February 15, 2022 03:39 PM UTC

Hello 

But again my question is the same. 

I want to show the progress bar when I am uploading my video in AZURE BLOB. 

So all the process is going in the backend controller

How to show PROGRESS BAR WHEN MY  AskDoUploadVideoOnlyAsync is under execution. 

How to use the progressbar ID in Controller Action. 

Here is my code. 




[HttpPost]
public async Task<IActionResult> Index(List<IFormFile> formFileVideo, UploadFilesInfo objuploadinfo)
 {
            switch (objuploadinfo.dpAssetType)
            {
                   case "videoAT":
                    await AskDoUploadVideoOnlyAsync(formFileVideo);
                    break;
             }
            return View();

} 


DG Durga Gopalakrishnan Syncfusion Team February 16, 2022 12:13 PM UTC

Hi Harshida, 

As of now, we don’t have support to create the progress bar in server side. You need to specify the required control tag in client side. We also don’t have option to trigger an event in server side to show and hide the progress bar in load and loaded events based on your requirement.  

Please let us know if you have any concerns. 

Regards, 
Durga G 



ND Naveen Davuluri May 13, 2024 10:09 PM UTC

Hi, is this possible now? I have the same requirements and it has been over 2 years since this post. Thought there would be some updates.



SB Swetha Babu Syncfusion Team May 16, 2024 10:32 AM UTC

Hi Naveen,


We have not yet provided support for server-side events. As of now, we request you to use the previously shared suggestion to achieve your requirement.


Please let us know if you have any concerns.


Loader.
Up arrow icon