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 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.
View Code
CSHTML |
Copy Code
|
---|---|
@(Html.C1().FileManager().Id("FileManager") .HostUrl("http://localhost:61712") .InitPath("C1WebApi/test1") .CloudType(CloudTypes.DropBox) ) |