upload

Manually triggers the upload process.

  • The upload method is available only when the async.autoUpload option is set to false.
  • You can trigger the manual upload of files even if the Upload is disabled by calling the upload method. In such scenarios, the Upload ignores its enabled: false configuration and the files are uploaded while the Upload remains inactive for the user to interact with.

Example

<style>
  .k-clear-selected,
  .k-upload-selected {
    display: none !important;
  }
</style>

<input name="files" id="files" type="file" />
<button id="uploadAll" class="k-button">Start upload</button>
<script>

  $(document).ready(function() {
    $("#files").kendoUpload({
      async: {
        autoUpload: false,
        saveUrl: "http://my-app.localhost/save",
        removeUrl: "http://my-app.localhost/remove"
      }
    });

    $("#uploadAll").on('click', function(e){
      e.preventDefault();

      var upload = $("#files").data("kendoUpload");
      upload.upload();
    })
  });
</script>
In this article
Not finding the help you need? Improve this article