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

If retry of failed upload successful, the upload still has error styling applied

4 Answers 95 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 08 Oct 2014, 05:30 PM
If retry of failed upload successful, the upload still has error styling applied.  How do we "refresh" the list item with appropriate styling?  See screenshot attached.

Relevant code:

<input name="files" id="files" type="file" />

$("#files").kendoUpload({
    async: {
        saveUrl: "/Referral/UploadAttachment",
        removeUrl: "/Referral/DeleteAttachment",
        autoUpload: true
    },
    error: onError,
    upload: onUpload,
    remove: onRemove
});


4 Answers, 1 is accepted

Sort by
0
Bob
Top achievements
Rank 1
answered on 08 Oct 2014, 08:49 PM
Worked around this weirdness by using success event.  By default, when a file is retried and works, the "k-file-success" class is applied, but the "k-file-error" class is not removed.

function onSuccess(e)
{
    $(".k-file-success").removeClass(" k-file-error");
}
0
Dimiter Madjarov
Telerik team
answered on 09 Oct 2014, 07:54 AM
Hello Bob,


We had such issues in older Kendo UI version, but it has been fixed in recent releases. What is the currently used version? If it is older than Q2 2014, I would suggest updating to a newer one.

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
Bob
Top achievements
Rank 1
answered on 09 Oct 2014, 01:15 PM
We are currently on 2014.Q1 so I will leave my hack in place until we can test out latest version.  Thanks.
0
Dimiter Madjarov
Telerik team
answered on 09 Oct 2014, 01:24 PM
Hello Bob,


Thanks for the update. Indeed the workaround is suitable for updating the file status in older versions.

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
Bob
Top achievements
Rank 1
Answers by
Bob
Top achievements
Rank 1
Dimiter Madjarov
Telerik team
Share this question
or