ComponentOne ASP.NET MVC Controls
Working with Controls / File Manager
In This Topic
    File Manager
    In This Topic

    File Manager is a UI control which allows you to manage your files efficiently. It handles all your files, whether stored in local server or cloud storage accounts. The control integrates with Cloud Storage APIs for listing, uploading, downloading, moving, and deleting files. It supports integration with the AWS, Azure, DropBox, GoogleDrive, and OneDrive clouds.

    File Manager control is represented by the FileManager class. The FileManager class 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. As it supports multiple clouds, it also allows you to choose the type of cloud service to support according to your requirements using the CloudType property which accepts the cloud name from the CloudTypes enumeration.

    The following example demonstrates the File Manager control integrating with the DropBox. In the following example, the File Manager control is integrated with the DropBox cloud and accesses a folder from our DropBox account. Hence, the InitialPath key is set as "C1WebApi/test1" here. If you have already configured a Cloud WebAPI service, use the host url, folder path and type of your cloud service in the following code. In case, you have not configured any Cloud WebAPI service, see Cloud Services to configure a Cloud API.

    Note: In order to connect to the cloud services, you need to configure the connection string and include all the other related information in the Web.config file.

    View Code

    CSHTML
    Copy Code
    @(Html.C1().FileManager().Id("FileManager")
      .HostUrl("http://localhost:61712")
      .InitPath("C1WebApi/test1")
      .CloudType(CloudTypes.DropBox)
    )
    

    Note: In order to work with FileManager, you require Bootstrap library.