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

    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.

    File Manager control integrating with the web storage and accessing a folder from the cloud storage

    The following example demonstrates the File Manager control integrating with the DropBox cloud and accessing 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.