This is a migrated thread and some comments may be shown as answers.

Retry on failed uploads

10 Answers 336 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 22 Apr 2014, 08:56 AM
We're currently using an async upload to try and upload many files to the server, some of which may contain errors which will fail that particular file upload. The user may then fix the error and retry the upload.
If there has been no change done on the file, then the save function is called immediately.
If there has been a change, then it takes some time to call the save function (sometimes the save function is never called).
Even if the save function returns success, the file still remains red (though it does display 100%).

What is the reason it takes so long to call the save function when the retry button is pressed and how do I change the list item so it is also green?

10 Answers, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 22 Apr 2014, 10:47 AM
Hello Mark,


I am not exactly sure what do you mean by "if there has been no change (or some change) on the file". Could you please elaborate further?

Regarding the second question, the same request as the initial one is performed when the upload is retried. I am unable to reproduce the described behavior on my side i.e. if the second attempt is successful, the list item receives the k-file-success class and it becomes green.

Would it be possible to provide a runnable example which demonstrates the issue? It would help us to assist further.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mark
Top achievements
Rank 1
answered on 22 Apr 2014, 11:19 AM
The upload is essentially a text file which is checked for certain content. By 'a change' I mean a modification is made to the content of the text file. I will upload a runnable example soon.
0
Dimiter Madjarov
Telerik team
answered on 22 Apr 2014, 12:35 PM
Hello Mark,


Thank you for the clarification about the file content modification. It helped me to reproduce the issue locally, so sending the runnable example will not be required. I will inspect the problem further and get back to you when I have more information about the problem.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Dimiter Madjarov
Telerik team
answered on 22 Apr 2014, 02:17 PM
Hi Mark,


Indeed this turned out to be a bug - the state of the file is not updated correctly after a retry. The issue is already logged for fixing. As a temporary workaround you could bind to the success event of the widget and execute the following code, which will maintain the correct state.
E.g.
function onSuccess(e) {
    this.wrapper.find(".k-file-success").removeClass("k-file-error");
 
    if (this.wrapper.find(".k-file-error").length === 0) {
        this.wrapper.find(".k-upload-status-total .k-warning").removeClass("k-warning").addClass("k-i-tick");
    }
}

As a small sign of gratitude I also updated your Telerik points. Let me know if I could assist you further on this topic.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mark
Top achievements
Rank 1
answered on 22 Apr 2014, 11:08 PM
Thanks for that fix.

Just as an extra note, the issue with the upload retry taking a long time to perform only occurs in Firefox. I've just attempted it in Chrome, and the same issue does not occur, do you know what could be causing this?
0
Dimiter Madjarov
Telerik team
answered on 23 Apr 2014, 11:10 AM
Hello Mark,

The fix is already applied and will be available in the next internal build.

Regarding the current problem, I tried to reproduce it locally, but to no avail, so I could not state exactly what could be the reason. If the issue is still persisting, please provide a small project, which demonstrates it.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mark
Top achievements
Rank 1
answered on 24 Apr 2014, 06:40 AM
Hi Dimiter

I've attached a sample controller and view (project was too large) demonstrating the issue when the following steps are taken:
1. Attempt to upload a text file with the word "fail" in it, this will cause the upload to fail.
2. You may retry this, and the retry will occur almost immediately.
3. Remove the word "fail" from the text file, save it and press the retry button.
The retry will take a long time to reach the controller. I have only observed this issue with Firefox.

Kind Regards
Mark Kerollos
0
Dimiter Madjarov
Telerik team
answered on 24 Apr 2014, 08:58 AM
Hello Mark,


Thank you for providing the details. I managed to reproduce the same behavior on our side too, but I was unable to find an error in the Upload widget source code, which might be causing it. I will log this for further investigation, but it seems to be a browser bug, related to the repeated requests of file with changed content. We cannot provide a workaround, but if we manage to discover the reason for this, I will post it here for convenience.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mark
Top achievements
Rank 1
answered on 15 May 2014, 06:34 AM
Hi Dimiter,

Just wondering if there is any update to the possible cause of this?
It seems that currently in firefox, the controller now receives the action immediately, however the files list is always null on retry. No issue in chrome.

Regards
Mark Kerollos
0
Dimiter Madjarov
Telerik team
answered on 15 May 2014, 09:10 AM
Hi Mark,


It was stated that this is a browser issue in Firefox related to the repeated requests of files with changed content. From the Kendo UI Upload widget perspective we cannot provide a workaround for the problem. I would suggest you to forward the inquiry to the Firefox Bug-tracker.

Regards,
Dimiter Madjarov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Upload
Asked by
Mark
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Mark
Top achievements
Rank 1
Share this question
or