Edit this page

Remove Files with Confirmation Dialog

The following example demonstrates how to display a custom confirmation dialog by utilizing the kendo.confirm() method.

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

    <script>
      $(document).ready(function() {
         var fileUidToRemove = "";

          $("#files").kendoUpload({
            async: {
              autoUpload: false,
              saveUrl: "save",
              removeUrl: "remove",
              withCredentials: false
            },
            remove: function(e) {
              fileUidToRemove = e.files[0].uid;
              e.preventDefault();

              kendo.confirm("Remove the file?").then(function(){
                $("#files").data("kendoUpload").removeFileByUid(fileUidToRemove);
              });
            }
          });
      });
    </script>

See Also

For more runnable examples on the Kendo UI Upload widget, browse its How To documentation folder.

Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy