# Class UploadLimits | EchoHub Documentation
Admin-configurable upload limits, bound from the Uploads configuration section. Sizes are expressed in megabytes in configuration; the *Bytes accessors convert them for enforcement. Every default mirrors so an absent or partial Uploads section preserves the historical built-in limits.

# Class UploadLimits

Namespace
  EchoHub.Server.Config

Assembly
  EchoHub.Server.dll

Admin-configurable upload limits, bound from the `Uploads` configuration section. Sizes are expressed in megabytes in configuration; the `*Bytes` accessors convert them for enforcement. Every default mirrors HubConstants so an absent or partial `Uploads` section preserves the historical built-in limits.

    public sealed class UploadLimits

Inheritance
  object
  UploadLimits

Inherited Members
  object.GetType()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Constructors

### UploadLimits()

    public UploadLimits()

## Properties

### MaxAttachmentsPerMessage

    public int MaxAttachmentsPerMessage { get; init; }

#### Property Value

int

### MaxAudioSizeBytes

    public long MaxAudioSizeBytes { get; }

#### Property Value

long

### MaxAudioSizeMB

    public int MaxAudioSizeMB { get; init; }

#### Property Value

int

### MaxAvatarSizeBytes

    public long MaxAvatarSizeBytes { get; }

#### Property Value

long

### MaxAvatarSizeMB

    public int MaxAvatarSizeMB { get; init; }

#### Property Value

int

### MaxFileSizeBytes

    public long MaxFileSizeBytes { get; }

#### Property Value

long

### MaxFileSizeMB

    public int MaxFileSizeMB { get; init; }

#### Property Value

int

### MaxImageSizeBytes

    public long MaxImageSizeBytes { get; }

#### Property Value

long

### MaxImageSizeMB

    public int MaxImageSizeMB { get; init; }

#### Property Value

int

### MaxRequestBodyBytes

Absolute ceiling for one message request body (largest file × the attachment cap). Used to size the request-body and multipart limits so a configured increase actually takes effect.

    public long MaxRequestBodyBytes { get; }

#### Property Value

long

## Methods

### MaxForKind(AttachmentKind)

Maximum accepted size for a single attachment of the given kind.

    public long MaxForKind(AttachmentKind kind)

#### Parameters

`kind` AttachmentKind

#### Returns

long