8 Answers, 1 is accepted
0
Hello Juan,
The current behavior is very questionable - the reset should not send any information to the server. We'll change it to simply clean the file list. Removing all files can be done via a removeAll() method, for example.
Thank you for bringing this question up. As a token of gratitude for your involvement your Telerik points have been updated.
Regards,
Tsvetomir Tsonev
the Telerik team
The only way to do that at the moment is to remove the elements from the DOM directly:
$(
"#attachments"
).parents(
".t-upload"
).find(
".t-upload-files"
).remove()
The current behavior is very questionable - the reset should not send any information to the server. We'll change it to simply clean the file list. Removing all files can be done via a removeAll() method, for example.
Thank you for bringing this question up. As a token of gratitude for your involvement your Telerik points have been updated.
Regards,
Tsvetomir Tsonev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Vishwa
Top achievements
Rank 1
answered on 21 Jan 2012, 08:18 PM
I have (temporarily) called : $(".k-upload-files").remove(); to reset the list of the selected files. Work for well for me.
0
Daniel
Top achievements
Rank 1
answered on 17 Apr 2014, 08:45 AM
I need this behavior too! This should be build into upload widget!
Regards,
Daniel
BTW: The workaround mentioned by T.Tsonev works for me (but this should not be the right way to do it)
Regards,
Daniel
BTW: The workaround mentioned by T.Tsonev works for me (but this should not be the right way to do it)
0
Hi Daniel,
Thank you for the suggestion. I'll pass it to the development team for discussion if this functionality should be added out of the box. Meanwhile you could also post it as a suggestion in our Feedback portal or vote for it if it's already there.
Regards,
Dimiter Madjarov
Telerik
Thank you for the suggestion. I'll pass it to the development team for discussion if this functionality should be added out of the box. Meanwhile you could also post it as a suggestion in our Feedback portal or vote for it if it's already there.
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
Mac
Top achievements
Rank 2
answered on 13 May 2014, 12:44 PM
+1 for fixing this.
0
Hello Scott,
As stated in the previous post, you could post this as a suggestion in our Feedback portal. I checked and it seems that this has not been posted yet.
In the mean time, you could use the workaround from the previous post.
Regards,
Dimiter Madjarov
Telerik
As stated in the previous post, you could post this as a suggestion in our Feedback portal. I checked and it seems that this has not been posted yet.
In the mean time, you could use the workaround from the previous post.
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
Brandon Peterson
Top achievements
Rank 2
answered on 05 Jun 2014, 02:20 AM
Here is a function that I added in my general UI class to do this. Works with v2014.1.318
uploadReset: function(id) {
if (id) {
//if an id is passed as a param, only reset the element's child upload controls (in case many upload widgets exist)
$("#" + id + " .k-upload-files").remove();
$("#" + id + " .k-upload-status").remove();
$("#" + id + " .k-upload.k-header").addClass("k-upload-empty");
$("#" + id + " .k-upload-button").removeClass("k-state-focused");
} else {
//reset all the upload things!
$(".k-upload-files").remove();
$(".k-upload-status").remove();
$(".k-upload.k-header").addClass("k-upload-empty");
$(".k-upload-button").removeClass("k-state-focused");
}
}
0
Hi Brandon,
Thank you for sharing the sample code.
Regards,
Dimiter Madjarov
Telerik
Thank you for sharing the sample code.
Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!