Google Drive Personal File System Provider
The Google Drive file system provider (personal account) (GoogleDrivePersonalFileSystemProvider) allows you to connect the ASPxFileManager to the Google Drive (using client authorization).
Prerequisites
Register the Google Drive service account that belongs to a user’s account. The service account allows you to use the Google APIs to access a user’s account.
Provider Settings
Set the ASPxFileManager.ProviderType property to FileManagerProviderType.GoogleDrivePersonal to allow the ASPxFileManager to manage files and folders in Google Drive.
The GoogleDrivePersonalFileSystemProvider class allows to access files’ and folders’ hierarchy and manipulate these files in the file manager.
Do the following to connect the ASPxFileManager to Google Drive (personal account):
Use the AccountManager.RegisterGoogleDrivePersonal method to register the Google Drive personal account in the global.asax file.
AccountManager.RegisterGoogleDrivePersonal("FileManagerGoogleDrivePersonalAccount", "customClientID", "..MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCVoaYrE7fEgu...");
Use the ASPxFileManager.SettingsGoogleDrivePersonal property to specify the Google Drive personal account settings:
- AccountName - Specifies the Google Drive personal account’s name.
- FileManagerOneDriveProviderSettings.RedirectUri - Specifies the URL to which the browser is redirected when authentication is complete.
<dx:ASPxFileManager ID="FileManager" runat="server" ProviderType="GoogleDrivePersonal"> <SettingsGoogleDrivePersonal AccountName="FileManagerGoogleDrivePersonalAccount" RedirectUrl="mysite.com" /> ... </dx:ASPxFileManager>
The ASPxFileManager allows you to handle every request to Google Drive personal account (the ASPxFileManager.CloudProviderRequest event).