clearFileByUid
Visually removes a file by its ID from the UI without issuing requests to the remove
handler.
Example
<input name="files" id="files" type="file" />
<button id="clearSelected" class="k-button">Clear all checked</button>
<script>
$(document).ready(function() {
$("#files").kendoUpload({
template: ({ files, name }) => "<span class='k-progress'></span>" +
`<input id='${files[0].uid}' type='checkbox' class='k-checkbox k-checkbox-md' />` +
`<label for='${files[0].uid}' class='k-checkbox-label'>Filename: ${name}</label>`
});
$("#clearSelected").on('click', function(e){
e.preventDefault();
var upload = $("#files").data("kendoUpload");
upload.wrapper.find(".k-checkbox:checked").each(function() {
upload.clearFileByUid($(this).attr("id"));
});
});
});
</script>