O'Reilly logo

Kendo UI Cookbook by Sagar Ganatra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Uploading files to the server asynchronously

In this recipe, we will take a look at uploading files asynchronously to the server. This method uses the HTML5 File API to upload the files to the server. While the files are being uploaded, the progress of the file upload is shown in the uploader widget.

Getting started

This recipe will require server-side handlers that can store or remove files.

How to do it…

Let's use the same form to upload the files to the server. To upload the files asynchronously, specify the async configuration:

$('#fileUpload').kendoUpload({
  async: {
    'saveUrl': '/fileUploadService/save',
    'removeUrl': '/fileUploadService/remove',
    'autoUpload': true
  }
});

Here, the async configuration specifies the three attributes: saveUrl, removeUrl ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required