ASP.NET MVC Controls | ComponentOne
Working with Controls / File Manager / Manage Files in Local Storage
In This Topic
    Manage Files in Local Storage
    In This Topic

    In addition to cloud storage, FileManager supports the local storage. It uses the storage APIs of the C1WebAPI to integrate with the local storages and handles all your files stored in the local server. File Manager allows you to choose the local storage using CloudType property of the FileManager class, which accepts the cloud name from the CloudTypes enumeration. Additionally, it also allows you to host the Url of the machine which hosts the server using the HostUrl property and define the initial path of the root folder from cloud container folder using the InitPath property.

    File Manager control integrating with the local storage and accessing a folder from the file system in local storage

    The following example demonstrates the File Manager control integrating with the local storage and accessing a folder from the file system in local storage. Hence, the InitialPath key is set as "ExcelRoot/LocalDocuments" in the example.

    View Code

    Index.cshtml
    Copy Code
    @(Html.C1().FileManager().Id("FileManager")
    .HostUrl("http://localhost:61712")
    .InitPath("ExcelRoot/LocalDocuments")
    .CloudType(CloudTypes.LocalStorage)
    )