New to Kendo UI for jQuery? Download free 30-day trial

Remove Files for Upload with Errors


Product Progress® Kendo UI® Upload for jQuery
Operating System Windows 10 64bit
Visual Studio Version Visual Studio 2017
Preferred Language JavaScript


How can I remove files from the Kendo UI Upload when file validation fails?


The following example demonstrates how to remove files from the Kendo UI Upload when the upload/remove data operation fails due to errors or failing validation.

  html {
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
<input name="files" id="files" type="file" />
  function onError(e) {
    var files = e.files;
    for (var i = 0; i < files.length; i++) {
      alert("Validation failed for " + files[i].name);

      var uid = files[i].uid;
      var entry = $(".k-file[data-uid='" + uid + "']");
      if (entry.length > 0) {

  $(document).ready(function() {
      async: {
        saveUrl: "save",
        removeUrl: "remove",
        autoUpload: true
      error: onError

See Also

In this article