Local Data

The Kendo UI FileManager enables you to bind it to local arrays of data.

To bind the FileManager to local data, set the dataSource option of the kendoFileManager object. The data should correspond ot the FileManager built-in model schema (see Data Binding Overview article)

    // Define the HTML div that will contain the FileManager.
    <div id="filemanager"></div>

    // Initialize the FileManager with local data.
    <script>
      var myData = [
        {
          name: "Folder",
          isDirectory: true,
          hasDirectories: false,
          path: "folder",
          extension: "",
          size: 0,
          createdUtc: new Date(),
          items: [
              {
                name: "Image.jpg",
                isDirectory: false,
                hasDirectories: false,
                path: "folder/Image.jpg",
                extension: ".jpg",
                size: 20,
                createdUtc: new Date(),
              },
              {
                name: "Image2.jpg",
                isDirectory: false,
                hasDirectories: false,
                path: "folder/Image2.jpg",
                extension: ".jpg", 
                size: 20,
                createdUtc: new Date(),
              }
          ]        
        }
      ];
    $("#filemanager").kendoFileManager({               
        dataSource: {
          schema: kendo.data.schemas.filemanager,
          data: myData
        }
    });     

    </script>
In this article
Not finding the help you need? Improve this article