Back to Devexpress

UploadControlGoogleDriveSettings Class

aspnet-devexpress-dot-web-60922e4a.md

latest3.5 KB
Original Source

UploadControlGoogleDriveSettings Class

Contains settings that allow you to connect the Upload Control to Google Drive.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class UploadControlGoogleDriveSettings :
    UploadControlUploadStorageSettingsBase
vb
Public Class UploadControlGoogleDriveSettings
    Inherits UploadControlUploadStorageSettingsBase

The following members return UploadControlGoogleDriveSettings objects:

LibraryRelated API Members
ASP.NET Web Forms ControlsASPxUploadControl.GoogleDriveSettings
ASP.NET MVC ExtensionsUploadControlBinderSettings.GoogleDriveSettings
UploadControlSettings.GoogleDriveSettings

Remarks

Follow the steps below to connect the Upload Control to Google Drive:

  1. Call the RegisterGoogleDrive method in the Global.asax file.
  2. Set the Upload Control’s UploadStorage property to GoogleDrive.
  3. Assign a Google Drive account’s name to the GoogleDriveSettings.AccountName property.

The following example demonstrates how to connect the Upload Control to Google Drive:

cs
void Application_Start(object sender, EventArgs e) {
   DevExpress.Web.AccountManager.RegisterGoogleDrive("YourGoogleDriveAccount", "YourEmail", "YourPrivateKey");
}
aspx
<dx:ASPxUploadControl ID="UploadControl" runat="server" UploadStorage="GoogleDrive" ShowUploadButton="True" >
    <GoogleDriveSettings AccountName="YourGoogleDriveAccount" />
</dx:ASPxUploadControl>

Once the Upload Control uploads a file to cloud storage, you can use the key name of this file to access it. To obtain a file key name, use the FileNameInStorage property of an UploadedFile object.

Implements

IStateManager

IPropertiesOwner

Inheritance

Object StateManager PropertiesBase UploadControlUploadStorageSettingsBase UploadControlGoogleDriveSettings UploadControlGoogleDrivePersonalSettings

See Also

Cloud Storage Account Management

UploadControlGoogleDriveSettings Members

DevExpress.Web Namespace