Asynchronous Upload

This feature allows you to upload and remove files asynchronously. To achieve this, set the asyncUpload property to ‘true’. The default value of asyncUpload property is ‘true’. The data type is Boolean.

The following code helps to upload the file asynchronously.

  • html
  • <div style="width:100px;height:35px;">
    
    <ej-uploadbox id="UploadDefault" [saveUrl]="saveURL" [removeUrl]="removeURL" [asyncUpload]="true"></ej-uploadbox>
    
    </div>
  • html
  • import {Component} from '@angular/core';
        @Component({
        selector: 'ej-app',
            templateUrl: 'app/components/uploadbox/uploadbox.component.html'
        })
        export class UploadBoxComponent {
            saveURL:string;
            removeURL:string;
            constructor() {
            this.saveURL = '../saveFiles.ashx';
            this.saveURL = '../removeFiles.ashx';
            }
        }

    Configure saveFiles.ashx and removeFiles.ashx files as mentioned in the Save file action and Remove file action respectively.