Multiple files upload

The Uploadbox widget provides support to upload multiple files spontaneously. The multipleFilesSelection property enables you to select multiple files while browsing. To achieve this, set the multipleFilesSelection property to ‘true’. The data type is Boolean.

NOTE

The Multiple file selection supports all the latest versions of browser except Internet Explorer 9 and its previous versions.

The following steps explain the configuration of multipleFilesSelection property in Uploadbox.

In the HTML page, add the <div> element to configure the Uploadbox element.

  • html
  • <div class="control">
        <div id="Uploadbox"></div>
    </div>
  • js
  • // Initialize the control in JavaScript.
    /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    
    module UploadboxComponent {
        $(function () {
            var sample = new ej.Uploadbox($("#Uploadbox"),{
                saveUrl: "saveFiles.ashx",
                removeUrl: "removeFiles.ashx",
                multipleFilesSelection: true
            });
        });
    }

    For JS, configure saveFiles.ashx and removeFiles.ashx files as mentioned in the Save file action and Remove file action respectively.

    The following screenshot displays the output.