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

re upload the selected files on error

1 Answer 250 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Daniele Bruno
Top achievements
Rank 1
Daniele Bruno asked on 09 Sep 2015, 08:53 AM

Hi,

I am trying to create a custom button "Reupload" for kendo upload. The button should reulodad selected files in case of error during the previous upload.

somthing like this:

....

     , error: function (e) {
            
            if ((e.XMLHttpRequest.status != null) && (e.XMLHttpRequest.status == 500))
            {
                this.wrapper.find(".k-file").removeClass("k-file-error");

                $("#reupload_btn).click(function () {  

doSomething.....

});

}

 

It's possible to create a similar behavior?

 My version of kendo UI is v2014.1.416.

  

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 09 Sep 2015, 10:33 AM

Hello Daniele Bruno,

When the uploading of the file has failed, the widget automatically renders a retry button. You could trigger it's click event to achieve the required behavior. Here is an example that demonstrates the approach.

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