Problems with uploading multiple files using template.

Hi there,

I am using the example code found at https://blazor.syncfusion.com/documentation/file-upload/template#adding-progressbar-using-template to upload multiple files, but am having problems adapting this to upload multiple files.

1) The ProgressValue in the example is set at the component level; how do I gracefully achieve a progress bar for each file as it is uploaded?

2) I am unable to figure out how to get something to happen after all files are uploaded.  I have added Console.Writeline statements to the BeforeUpload, OnSuccess, On Change, and OnActionCompleted functions.  When I attempted to drag five files into the drop zone, the result occurred in this order:

BeforeUpload

OnSuccess

OnSuccess

OnSuccess

OnSuccess

OnSuccess

OnActionComplete

Onchange (file 1)

Finally

Onchange (file 2)

Finally

Onchange (file 3)

Finally

Onchange (file 4)

Finally

Onchange (file5)


It doesn't seem to me that OnActionComplete is waiting until all files are processed before firing.  Is there another way that I should be approaching this?  For what it's worth, this is a Blazor Server project.

Thanks,

Christopher


1 Reply

PK Priyanka Karthikeyan Syncfusion Team June 6, 2024 01:35 PM UTC

Hi Christopher,

 

Query1: "Regarding Progress Bar for Each File Upload"

 

In the shared documentation, we showcase the progress bar for uploaded file status using custom templates. Could you please provide more details on how you intend to achieve this on your end? This information will help us better understand the issue and provide you with a prompt and accurate response.

 

Query2: "Concerning OnActionComplete Event"

 

We've diligently created a sample based on our documentation, and we haven't encountered any issues with the latest version. The OnActionComplete event triggers once all files are uploaded. You can find the sample and a video illustration for your reference.

To expedite the resolution process and ensure accurate assistance, could you kindly modify the shared sample to align it more closely with your specific scenario? Additionally, providing detailed steps to replicate the issue on our end would greatly assist us in addressing any challenges you may be facing.

Your cooperation in this matter is highly appreciated, and we are committed to resolving any issues promptly and effectively. Thank you for your collaboration and time.

 

 

Regards,

Priyanka K


Attachment: UploaderProgressBar_e626ca00.zip

Loader.
Up arrow icon