SfUploader BeforeUploadEventArgs contain incorrect data with AutoUpload = true + SequentialUpload = true

SfUploader has a couple of issue in the configuration AutoUpload = true + SequentialUpload = true.

First Issue: The first eventargs in the BeforeUpload event are correct but subsequent events show data that is "one behind" the file being uploaded.

Test code

private void BeforeUpload(BeforeUploadEventArgs args)
{
    System.Diagnostics.Debug.Print($"BeforeUpload:BEGIN");
    foreach (var file in args.FilesData)
    {
        System.Diagnostics.Debug.Print($"{file.Id}");
    }
    args.Cancel = true;
    System.Diagnostics.Debug.Print($"BeforeUpload:END");
}


Debug Output

BeforeUpload:BEGIN
test_0.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_0.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_1.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_2.txt
BeforeUpload:END


Expected Result

BeforeUpload:BEGIN
test_0.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_1.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_2.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_3.txt
BeforeUpload:END


Second Issue: Removing and adding files in the UI during the same test also show an issue where the BeforeUpload event will stop firing until you get enough files back in the list. For example, 1) add 5 files, 2) remove 3, and 3) add 5 files. (output below) You'll have to add 3 files before the event starts firing again but in the meantime the event is lost for some files.


Debug Output


BeforeUpload:BEGIN
test_0.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_0.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_1.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_2.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_3.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_7.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_8.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_9.txt
BeforeUpload:END

Expected Result

BeforeUpload:BEGIN
test_0.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_1.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_2.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_3.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_4.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_5.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_6.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_7.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_8.txt
BeforeUpload:END
BeforeUpload:BEGIN
test_9.txt
BeforeUpload:END






Attachment: screenshot_549594d9.zip

11 Replies 1 reply marked as answer

SP Sureshkumar P Syncfusion Team July 27, 2022 02:44 PM UTC

Hi Jerrill,


We will validate the requirement in our component. We update you in two business days (July 29th, 2022).



Regards,


Sureshkumar P




MM Mohanraj Mathaiyan Syncfusion Team July 31, 2022 04:24 PM UTC

Hi Jerrill,

Query 1


We ensured the reported issue based on the shared details, but we cannot replicate the first issue in our end. I have attached output record video and working sample for reference.

Query 2


Please confirm that you are facing the below issue in your end. while ensure your second issue we have faced below mentioned issue only.

Replication procedure:

  1. Add 5 files

  2. Remove 3

  3. Again add 5 files

Expected: While again adding 5 files, all files should upload with correct filedata in BeforeUpload event.

Output: while again adding 5 files, last two files only uploaded, other 3 not uploaded and event not triggered.

I have attached output record video and sample for reference.

Output record video : https://www.syncfusion.com/downloads/support/common/2797/ze/Uploader_46ce08be.zip



Regards,

Mohanraj M


Attachment: fileuploader_8f26bc68.zip


JE Jerrill August 1, 2022 06:15 PM UTC

Ok. I’ll see if I can find the difference or come up with a way to reproduce the issue in your project. Traveling this week, but I should be able to take a look Thursday or Friday and report back. Thank you all!

Jerrill



MM Mohanraj Mathaiyan Syncfusion Team August 2, 2022 06:05 AM UTC

Hi Jerrill,


Thanks for your update.


Regards,

Mohanraj M



JE Jerrill August 3, 2022 09:33 PM UTC

The major difference is that you have a Blazor page (issue not present) where I'm able to reproduce the issue when the control is part of a Blazor component added to a Razor page. I've updated the project you provided and added a second link to a page that reproduces the issue. I've also included a video of what I'm seeing on my end.

NOTE: I've updated to 20.2.0.40 from 20.2.0.39 and the behavior of the "1-behind" issue has changed slightly. It no longer is "1-behind" but rather the 0th BeforeUpload event is duplicated when the second file is drag/dropped. This new behavior is reflected in the video attached.

Thank you for your assistance!


Attachment: fileuploaderissuereproduced_2d603e34.zip


SP Sureshkumar P Syncfusion Team August 8, 2022 11:43 AM UTC

Hi Jerrill, 

Thanks for your shared information. We have confirmed the reported issue is an issue at our end and this fix will be included in our upcoming weekly patch release, which is expected to be rolled out on August 24th, 2022.

You can track the status of this issue from the below feedback.

Feedback: https://www.syncfusion.com/feedback/36886

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization



Regards,

Sureshkumar P



SP Sureshkumar P Syncfusion Team August 24, 2022 10:07 AM UTC

Hi Jerrill,

We have fixed your reported issue from our end in the latest 20.2.45 version. So, we suggest you upgrade to our latest version to resolve the current issue.

Regards,

Sureshkumar P


Marked as answer

JE Jerrill September 15, 2022 07:50 PM UTC

I've tried to validate the fix using version 20.2.0.49 and I'm still seeing problems when both settings are set to true. Now, I only get ONE BeforeUpload event and ALL the files come through at once in the ValueChanged event instead in sequential events.

I've modified the project slightly to include the ValueChanged and OnRemove events (for completeness).

I've also included the test files I'm using in a testdata folder.

Test:

1) Start project.

2) Follow File Upload - Broken link.

3) Drag/drop 10 test file into the file upload control.

Expected Result:

BeforeUpload : BEGIN
BeforeUpload : test_0_0.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_1_1.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_2_2.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_3_3.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_4_4.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_5_5.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_6_6.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_7_7.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_8_8.txt
BeforeUpload : END
BeforeUpload : BEGIN
BeforeUpload : test_9_9.txt
BeforeUpload : END
ValueChanged : BEGIN
ValueChanged : test_0_0.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_1_1.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_2_2.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_3_3.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_4_4.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_5_5.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_6_6.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_7_7.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_8_8.txt
ValueChanged : END
ValueChanged : BEGIN
ValueChanged : test_9_9.txt
ValueChanged : END

Actual Result:

BeforeUpload : BEGIN
BeforeUpload : test_9_9.txt
BeforeUpload : END
ValueChanged : BEGIN
ValueChanged : test_0_0.txt
ValueChanged : test_1_1.txt
ValueChanged : test_2_2.txt
ValueChanged : test_3_3.txt
ValueChanged : test_4_4.txt
ValueChanged : test_5_5.txt
ValueChanged : test_6_6.txt
ValueChanged : test_7_7.txt
ValueChanged : test_8_8.txt
ValueChanged : test_9_9.txt
ValueChanged : END





Attachment: fileuploaderbroken_93cfbdf5.zip



SP Sureshkumar P Syncfusion Team September 16, 2022 01:36 PM UTC

Hi Jerrill, 

We have confirmed the reported issue already consider a bug at our end. We will include the fix in the weekly patch release to be rolled out on September 20th. Until then you can track the status of the bug using the below feedback.


https://www.syncfusion.com/feedback/37639/

Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization



Regards,

Sureshkumar P



SP Sureshkumar P Syncfusion Team September 21, 2022 02:02 PM UTC

Hi Jerrill,


We are facing complexity to resolve this issue. We will include it in the upcoming weekly patch release.

Which is expected to be rolled out on October 5th,2022.


Regards,

Sureshkumar P



SP Sureshkumar P Syncfusion Team October 7, 2022 04:51 AM UTC

Hi Jerrill,

We are glad to announce that our Essential Studio 2022 Volume 3 release v20.3.0.47 is rolled out and is available for download under the following link.

https://www.syncfusion.com/forums/177858/essential-studio-2022-volume-3-main-release-v20-3-0-47-is-available-for-download

We have also included the fix for the issue “The before upload event duplicate the initial uploaded data” with our volume release. So please upgrade your package to the latest to resolve the issue from your end.

Regards,

Sureshkumar P


Loader.
Up arrow icon