Back to Devexpress

UploadControlAmazonSettings Class

aspnet-devexpress-dot-web-13274c32.md

latest4.4 KB
Original Source

UploadControlAmazonSettings Class

Contains settings that allow you to connect the Upload Control to Amazon Simple Storage Service (Amazon S3).

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

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

The following members return UploadControlAmazonSettings objects:

LibraryRelated API Members
ASP.NET Web Forms ControlsASPxHtmlEditorUploadSettingsBase.AmazonSettings
ASPxUploadControl.AmazonSettings
ASP.NET MVC ExtensionsHtmlEditorFileSaveSettings.AmazonSettings
UploadControlBinderSettings.AmazonSettings
UploadControlSettings.AmazonSettings

Remarks

Follow the steps below to connect the Upload Control to Amazon:

  1. Call the RegisterAmazon method in the Global.asax file.
  2. Set the Upload Control’s UploadStorage property to Amazon.
  3. Assign an Amazon account’s name to the AmazonSettings.AccountName property.
  4. Assign a bucket name to the AmazonSettings.BucketName property.

Important

The AmazonFileSystemProvider uses an SSL connection to get data from Amazon. Due to SSL limitations, you cannot connect the control to a bucket whose name includes dots. Refer to the following topic for more information: Bucket naming rules.

The following example demonstrates how to connect the Upload Control to Amazon Simple Storage Service:

cs
void Application_Start(object sender, EventArgs e) {
    DevExpress.Web.AccountManager.RegisterAmazon("YourAmazonAccount","YourAccessKeyID","YourSecretAccessKey");
}
aspx
<dx:ASPxUploadControl ID="UploadControl" runat="server" UploadStorage="Amazon" ShowUploadButton="True" >
    <AmazonSettings AccountName="YourAmazonAccount" BucketName="YourBucketName" Region="us-east-1" />
</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 UploadControlAmazonSettings

See Also

Amazon S3 REST API Introduction

AWS SDK for .NET documentation

AWS SDK for .NET

Cloud Storage Account Management

UploadControlAmazonSettings Members

DevExpress.Web Namespace