Retry on failed uploads

11 posts, 0 answers
  1. Mark
    Mark avatar
    10 posts
    Member since:
    Mar 2014

    Posted 22 Apr 2014 Link to this post

    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?
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 22 Apr 2014 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
  4. Mark
    Mark avatar
    10 posts
    Member since:
    Mar 2014

    Posted 22 Apr 2014 in reply to Dimiter Madjarov Link to this post

    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.
  5. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 22 Apr 2014 Link to this post

    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!
     
  6. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 22 Apr 2014 Link to this post

    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!
     
  7. Mark
    Mark avatar
    10 posts
    Member since:
    Mar 2014

    Posted 22 Apr 2014 in reply to Dimiter Madjarov Link to this post

    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?
  8. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 23 Apr 2014 Link to this post

    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!
     
  9. Mark
    Mark avatar
    10 posts
    Member since:
    Mar 2014

    Posted 24 Apr 2014 in reply to Dimiter Madjarov Link to this post

    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
  10. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 24 Apr 2014 Link to this post

    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!
     
  11. Mark
    Mark avatar
    10 posts
    Member since:
    Mar 2014

    Posted 15 May 2014 in reply to Dimiter Madjarov Link to this post

    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
  12. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2153 posts

    Posted 15 May 2014 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready