Physical
The Bootstrap File Manager uses the physical file system provider when the ProviderType property is set to Physical or to NotSet (when no data source is specified). The physical file system provider is represented by the PhysicalFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items. This class can be used as an ancestor for custom file system providers as shown in the Custom File System Provider demo.
To visualize and manage the required physical file system, specify the root folder displayed within the Bootstrap File Manager control using the Settings.RootFolder or PhysicalFileSystemProvider.RootFolderDisplayName property.
<dx:BootstrapFileManager runat="server" Height="480px">
<Settings RootFolder="~/Content/FileManager/Files" ThumbnailFolder="~/Content/FileManager/Thumbnails" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true"
AllowRename="true" TemporaryFolder="~/Content/FileManager/Temp" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
Data Source
The data source file system provider allows you to use the File Manager to visualize file system data from a database. The Bootstrap File Manager uses the data source file system provider when the ProviderType property is set to DataSource or to NotSet when any data source is specified via the DataSourceID/DataSource property. The data source file system provider is represented by the DataSourceFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items.
The SettingsDataSource property provides access to the following file system provider settings:
- KeyFieldName - Gets or sets the name of the data source key field.
- ParentKeyFieldName - Gets or sets the name of the data source field which provides the item parent key values.
- NameFieldName - Gets or sets the name of the data source field which provides unique item identifier names.
- IsFolderFieldName - Gets or sets the name of the data source field which provides values indicating whether an item is a file or folder.
- FileBinaryContentFieldName - Gets or sets the name of the data source field which provides file content.
- LastWriteTimeFieldName - Gets or sets the name of the data source field which provides the time of the last file modification.
<dx:BootstrapFileManager runat="server" DataSourceID="FileManagerDataSource" Height="500px">
<Settings ThumbnailFolder="~/Content/FileManager/Thumbnails" />
<SettingsDataSource KeyFieldName="ID" ParentKeyFieldName="ParentID" NameFieldName="Name" IsFolderFieldName="IsFolder"
FileBinaryContentFieldName="Data" LastWriteTimeFieldName="LastWriteTime" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true"
AllowRename="true" TemporaryFolder="~/Content/FileManager/Temp" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
Amazon
The Bootstrap File Manager uses the Amazon file system provider when the ProviderType property is set to Amazon. The Amazon file system provider is represented by the AmazonFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items.
The Amazon account can be registered in the global.asax file using the AccountManager.RegisterAmazon method.
The SettingsAmazon property provides access to the following file system provider settings:
- AccountName - Gets or sets a value that specifies the name of the Amazon account.
- BucketName - Specifies the name of the bucket that contains a file system available from the upload control.
- Region - Specifies a geographical region where a bucket, which contains a file system available by the upload control, is stored.
You can perform custom actions on every request to Amazon S3 by handling the control's CloudProviderRequest server-side event.
<dx:BootstrapFileManager runat="server" Height="480px" ProviderType="Amazon">
<SettingsAmazon AccountName="FileManagerAmazonAccount" BucketName="dxdemobucket" Region="us-east-1" />
<Settings ThumbnailFolder="~\Thumb\" RootFolder="~\" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true" AllowRename="true" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
<%@ Application Language="C#" %>
<%@ Import Namespace="DevExpress.Web" %>
<script RunAt="server">
static System.Web.UI.Page CurrentPage {
get { return HttpContext.Current.CurrentHandler as System.Web.UI.Page; }
}
void Application_Start(object sender, EventArgs e) {
RegisterAccounts();
}
void RegisterAccounts() {
//Upload Control
AccountManager.RegisterAmazon("UploadAmazonAccount", CloudStoragesUtils.GetUploadAmazonAccessKeyID(), CloudStoragesUtils.GetUploadAmazonSecretAccessKey());
AccountManager.RegisterAzure("UploadAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetUploadAzureAccessKey());
AccountManager.RegisterDropbox("UploadDropboxAccount", CloudStoragesUtils.GetUploadDropboxAccessTokenValue());
//File Manager
AccountManager.RegisterAmazon("FileManagerAmazonAccount", CloudStoragesUtils.GetFileManagerAmazonAccessKeyID(), CloudStoragesUtils.GetFileManagerAmazonSecretAccessKey());
AccountManager.RegisterAzure("FileManagerAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetFileManagerAzureAccessKey());
AccountManager.RegisterDropbox("FileManagerDropboxAccount", CloudStoragesUtils.GetFileManagerDropboxAccessTokenValue());
AccountManager.RegisterOneDrive("FileManagerOneDriveAccount", CloudStoragesUtils.GetFileManagerOneDriveClientIDValue(), CloudStoragesUtils.GetFileManagerOneDriveClientSecretValue());
AccountManager.RegisterGoogleDrive("FileManagerGoogleDriveAccount", CloudStoragesUtils.GetFileManagerGoogleDriveClientEmailValue(), CloudStoragesUtils.GetFileManagerGoogleDrivePrivateKeyValue());
}
</script>
Azure
The Bootstrap File Manager uses the Azure file system provider when the ProviderType property is set to Azure. The Azure file system provider is represented by the AzureFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items.
The Azure account can be registered in the global.asax file using the AccountManager.RegisterAzure method.
The SettingsAzure property provides access to the following file system provider settings:
- AccountName - Gets or sets a value that specifies the name of the Azure account.
- ContainerName - Specifies a name of the container (blob storage) that contains a file system available from the upload control.
- BlobEndpoint - Gets or sets the primary endpoint for the Blob service.
You can perform custom actions on every request to Azure service by handling the control's CloudProviderRequest server-side event.
<dx:BootstrapFileManager runat="server" Height="480px" ProviderType="Azure">
<SettingsAzure AccountName="FileManagerAzureAccount" ContainerName="filemanagerdemo" />
<Settings ThumbnailFolder="~\Thumb\" RootFolder="~\" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true" AllowRename="true" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
<%@ Application Language="C#" %>
<%@ Import Namespace="DevExpress.Web" %>
<script RunAt="server">
static System.Web.UI.Page CurrentPage {
get { return HttpContext.Current.CurrentHandler as System.Web.UI.Page; }
}
void Application_Start(object sender, EventArgs e) {
RegisterAccounts();
}
void RegisterAccounts() {
//Upload Control
AccountManager.RegisterAmazon("UploadAmazonAccount", CloudStoragesUtils.GetUploadAmazonAccessKeyID(), CloudStoragesUtils.GetUploadAmazonSecretAccessKey());
AccountManager.RegisterAzure("UploadAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetUploadAzureAccessKey());
AccountManager.RegisterDropbox("UploadDropboxAccount", CloudStoragesUtils.GetUploadDropboxAccessTokenValue());
//File Manager
AccountManager.RegisterAmazon("FileManagerAmazonAccount", CloudStoragesUtils.GetFileManagerAmazonAccessKeyID(), CloudStoragesUtils.GetFileManagerAmazonSecretAccessKey());
AccountManager.RegisterAzure("FileManagerAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetFileManagerAzureAccessKey());
AccountManager.RegisterDropbox("FileManagerDropboxAccount", CloudStoragesUtils.GetFileManagerDropboxAccessTokenValue());
AccountManager.RegisterOneDrive("FileManagerOneDriveAccount", CloudStoragesUtils.GetFileManagerOneDriveClientIDValue(), CloudStoragesUtils.GetFileManagerOneDriveClientSecretValue());
AccountManager.RegisterGoogleDrive("FileManagerGoogleDriveAccount", CloudStoragesUtils.GetFileManagerGoogleDriveClientEmailValue(), CloudStoragesUtils.GetFileManagerGoogleDrivePrivateKeyValue());
}
</script>
Dropbox
The Bootstrap File Manager uses the Dropbox file system provider when the ProviderType property is set to Dropbox. The Dropbox file system provider is represented by the DropboxFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items.
The Dropbox account can be registered in the global.asax file using the AccountManager.RegisterDropbox method and then the account name can be specified using the SettingsDropbox.AccountName property.
You can perform custom actions on every request to Dropbox services by handling the control's CloudProviderRequest server-side event.
<dx:BootstrapFileManager runat="server" Height="480px" ProviderType="Dropbox">
<SettingsDropbox AccountName="FileManagerDropboxAccount" />
<Settings ThumbnailFolder="~\Thumb\" RootFolder="~\" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true" AllowRename="true" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
<%@ Application Language="C#" %>
<%@ Import Namespace="DevExpress.Web" %>
<script RunAt="server">
static System.Web.UI.Page CurrentPage {
get { return HttpContext.Current.CurrentHandler as System.Web.UI.Page; }
}
void Application_Start(object sender, EventArgs e) {
RegisterAccounts();
}
void RegisterAccounts() {
//Upload Control
AccountManager.RegisterAmazon("UploadAmazonAccount", CloudStoragesUtils.GetUploadAmazonAccessKeyID(), CloudStoragesUtils.GetUploadAmazonSecretAccessKey());
AccountManager.RegisterAzure("UploadAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetUploadAzureAccessKey());
AccountManager.RegisterDropbox("UploadDropboxAccount", CloudStoragesUtils.GetUploadDropboxAccessTokenValue());
//File Manager
AccountManager.RegisterAmazon("FileManagerAmazonAccount", CloudStoragesUtils.GetFileManagerAmazonAccessKeyID(), CloudStoragesUtils.GetFileManagerAmazonSecretAccessKey());
AccountManager.RegisterAzure("FileManagerAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetFileManagerAzureAccessKey());
AccountManager.RegisterDropbox("FileManagerDropboxAccount", CloudStoragesUtils.GetFileManagerDropboxAccessTokenValue());
AccountManager.RegisterOneDrive("FileManagerOneDriveAccount", CloudStoragesUtils.GetFileManagerOneDriveClientIDValue(), CloudStoragesUtils.GetFileManagerOneDriveClientSecretValue());
AccountManager.RegisterGoogleDrive("FileManagerGoogleDriveAccount", CloudStoragesUtils.GetFileManagerGoogleDriveClientEmailValue(), CloudStoragesUtils.GetFileManagerGoogleDrivePrivateKeyValue());
}
</script>
Google Drive
The Bootstrap File Manager uses the Google Drive file system provider when the ProviderType property is set to GoogleDrive. The Google Drive file system provider is represented by the GoogleDriveFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items.
The GoogleDrive account can be registered in the global.asax file using the AccountManager.RegisterGoogleDrive method and then the account name can be specified using the SettingsGoogleDrive.AccountName property.
You can perform custom actions on every request to Google Drive services by handling the control's CloudProviderRequest server-side event.
<dx:BootstrapFileManager runat="server" Height="480px" ProviderType="GoogleDrive">
<SettingsGoogleDrive AccountName="FileManagerGoogleDriveAccount" />
<Settings ThumbnailFolder="~\Thumb\" RootFolder="Files" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true" AllowRename="true" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
<%@ Application Language="C#" %>
<%@ Import Namespace="DevExpress.Web" %>
<script RunAt="server">
static System.Web.UI.Page CurrentPage {
get { return HttpContext.Current.CurrentHandler as System.Web.UI.Page; }
}
void Application_Start(object sender, EventArgs e) {
RegisterAccounts();
}
void RegisterAccounts() {
//Upload Control
AccountManager.RegisterAmazon("UploadAmazonAccount", CloudStoragesUtils.GetUploadAmazonAccessKeyID(), CloudStoragesUtils.GetUploadAmazonSecretAccessKey());
AccountManager.RegisterAzure("UploadAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetUploadAzureAccessKey());
AccountManager.RegisterDropbox("UploadDropboxAccount", CloudStoragesUtils.GetUploadDropboxAccessTokenValue());
//File Manager
AccountManager.RegisterAmazon("FileManagerAmazonAccount", CloudStoragesUtils.GetFileManagerAmazonAccessKeyID(), CloudStoragesUtils.GetFileManagerAmazonSecretAccessKey());
AccountManager.RegisterAzure("FileManagerAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetFileManagerAzureAccessKey());
AccountManager.RegisterDropbox("FileManagerDropboxAccount", CloudStoragesUtils.GetFileManagerDropboxAccessTokenValue());
AccountManager.RegisterOneDrive("FileManagerOneDriveAccount", CloudStoragesUtils.GetFileManagerOneDriveClientIDValue(), CloudStoragesUtils.GetFileManagerOneDriveClientSecretValue());
AccountManager.RegisterGoogleDrive("FileManagerGoogleDriveAccount", CloudStoragesUtils.GetFileManagerGoogleDriveClientEmailValue(), CloudStoragesUtils.GetFileManagerGoogleDrivePrivateKeyValue());
}
</script>
One Drive
The Bootstrap File Manager uses the One Drive file system provider when the ProviderType property is set to OneDrive. The One Drive file system provider is represented by the OneDriveFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items.
The OneDrive account can be registered in the global.asax file using the AccountManager.RegisterOneDrive method and then the account name can be specified using the SettingsOneDrive.AccountName property.
You can perform custom actions on every request to the /*OneDrive Azure Active Directory application account (from ASP.net demo)*/ by handling the control's CloudProviderRequest server-side event.
<dx:BootstrapFileManager runat="server" Height="480px" ProviderType="OneDrive">
<SettingsOneDrive AccountName="FileManagerOneDriveAccount" TokenEndpoint="https://login.microsoftonline.com/46ec2686-1c80-4e0a-81de-57aec8e4672f/oauth2/token" RedirectUri="http://localhost" />
<Settings ThumbnailFolder="~\Thumb\" RootFolder="Files" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true" AllowRename="true" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
<%@ Application Language="C#" %>
<%@ Import Namespace="DevExpress.Web" %>
<script RunAt="server">
static System.Web.UI.Page CurrentPage {
get { return HttpContext.Current.CurrentHandler as System.Web.UI.Page; }
}
void Application_Start(object sender, EventArgs e) {
RegisterAccounts();
}
void RegisterAccounts() {
//Upload Control
AccountManager.RegisterAmazon("UploadAmazonAccount", CloudStoragesUtils.GetUploadAmazonAccessKeyID(), CloudStoragesUtils.GetUploadAmazonSecretAccessKey());
AccountManager.RegisterAzure("UploadAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetUploadAzureAccessKey());
AccountManager.RegisterDropbox("UploadDropboxAccount", CloudStoragesUtils.GetUploadDropboxAccessTokenValue());
//File Manager
AccountManager.RegisterAmazon("FileManagerAmazonAccount", CloudStoragesUtils.GetFileManagerAmazonAccessKeyID(), CloudStoragesUtils.GetFileManagerAmazonSecretAccessKey());
AccountManager.RegisterAzure("FileManagerAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetFileManagerAzureAccessKey());
AccountManager.RegisterDropbox("FileManagerDropboxAccount", CloudStoragesUtils.GetFileManagerDropboxAccessTokenValue());
AccountManager.RegisterOneDrive("FileManagerOneDriveAccount", CloudStoragesUtils.GetFileManagerOneDriveClientIDValue(), CloudStoragesUtils.GetFileManagerOneDriveClientSecretValue());
AccountManager.RegisterGoogleDrive("FileManagerGoogleDriveAccount", CloudStoragesUtils.GetFileManagerGoogleDriveClientEmailValue(), CloudStoragesUtils.GetFileManagerGoogleDrivePrivateKeyValue());
}
</script>
SharePoint
The Bootstrap File Manager uses the SharePoint file system provider when the ProviderType property is set to SharePoint. The One Drive file system provider is represented by the SharePointFileSystemProvider class. This class defines methods for obtaining file and folder hierarchy, as well as methods for editing file manager items.
The OneDrive account can be registered in the global.asax file using the AccountManager.RegisterOneDrive method and then the account name can be specified using the SettingsSharePoint.AccountName property.
You can perform custom actions on every request to the /*SharePoint Azure Active Directory application account (from ASP.net demo)*/ by handling the control's CloudProviderRequest server-side event.
<dx:BootstrapFileManager runat="server" Height="480px" ProviderType="SharePoint">
<SettingsSharePoint AccountName="FileManagerOneDriveAccount" TokenEndpoint="https://login.microsoftonline.com/46ec2686-1c80-4e0a-81de-57aec8e4672f/oauth2/token" RedirectUri="http://localhost"
SiteName="ASPNETDemo" SiteHostName="aspnetteam.sharepoint.com" />
<Settings ThumbnailFolder="~\Thumb\" RootFolder="Files" />
<SettingsEditing AllowCopy="true" AllowCreate="true" AllowDelete="true" AllowDownload="true" AllowMove="true" AllowRename="true" />
<SettingsFileList>
<ThumbnailsViewSettings ThumbnailHeight="48" ThumbnailWidth="48" />
</SettingsFileList>
<SettingsAdaptivity Enabled="true" CollapseFolderContainerAtWindowInnerWidth="991" />
<SettingsToolbar ShowPath="false" />
<SettingsBreadcrumbs Visible="true" />
<SettingsFileList ShowFolders="true" ShowParentFolder="true"></SettingsFileList>
</dx:BootstrapFileManager>
<%@ Application Language="C#" %>
<%@ Import Namespace="DevExpress.Web" %>
<script RunAt="server">
static System.Web.UI.Page CurrentPage {
get { return HttpContext.Current.CurrentHandler as System.Web.UI.Page; }
}
void Application_Start(object sender, EventArgs e) {
RegisterAccounts();
}
void RegisterAccounts() {
//Upload Control
AccountManager.RegisterAmazon("UploadAmazonAccount", CloudStoragesUtils.GetUploadAmazonAccessKeyID(), CloudStoragesUtils.GetUploadAmazonSecretAccessKey());
AccountManager.RegisterAzure("UploadAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetUploadAzureAccessKey());
AccountManager.RegisterDropbox("UploadDropboxAccount", CloudStoragesUtils.GetUploadDropboxAccessTokenValue());
//File Manager
AccountManager.RegisterAmazon("FileManagerAmazonAccount", CloudStoragesUtils.GetFileManagerAmazonAccessKeyID(), CloudStoragesUtils.GetFileManagerAmazonSecretAccessKey());
AccountManager.RegisterAzure("FileManagerAzureAccount", CloudStoragesUtils.GetAzureStorageAccountName(), CloudStoragesUtils.GetFileManagerAzureAccessKey());
AccountManager.RegisterDropbox("FileManagerDropboxAccount", CloudStoragesUtils.GetFileManagerDropboxAccessTokenValue());
AccountManager.RegisterOneDrive("FileManagerOneDriveAccount", CloudStoragesUtils.GetFileManagerOneDriveClientIDValue(), CloudStoragesUtils.GetFileManagerOneDriveClientSecretValue());
AccountManager.RegisterGoogleDrive("FileManagerGoogleDriveAccount", CloudStoragesUtils.GetFileManagerGoogleDriveClientEmailValue(), CloudStoragesUtils.GetFileManagerGoogleDrivePrivateKeyValue());
}
</script>