files Array

The list of files that will be initially rendered in the files list of the Upload.

Each file object in the array has to contain the following properties:

  • name
  • size
  • extension

The files option is available only when the Upload is in async mode. As a result, the files are displayed as uploaded successfully.

Example - passing an array of initial files

<input type="file" name="files" id="upload" />
    var files = [
        { name: "file1.doc", size: 525, extension: ".doc" },
        { name: "file2.jpg", size: 600, extension: ".jpg" },
        { name: "file3.xls", size: 720, extension: ".xls" },

        async: {
            saveUrl: "Home/Save",
            removeUrl: "Home/Remove",
            autoUpload: true
        files: files

files.extension String

The extension of the initial file. String

The name of the initial file.

files.size Number

The size of the initial file.

In this article
Not finding the help you need? Improve this article