# TraconAttachmentOptions

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.traconattachmentoptions/
> Summary: TraconAttachmentOptions: Defines attachment upload limits for size and media-type allow lists.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Core.dll</code></div>

Defines attachment upload limits for size and media-type allow lists.

```csharp
public sealed class TraconAttachmentOptions
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.traconattachmentoptions/">TraconAttachmentOptions</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Remarks

Binary content lives in `attachments` and messages carry only a reference.
These options apply only during upload. Type validation reads the content's
leading bytes (its file signature), not the client-supplied `Content-Type`.

## Constructors

### <a id="Tracon_TraconAttachmentOptions__ctor"></a> TraconAttachmentOptions\(\)

```csharp
public TraconAttachmentOptions()
```

## Properties

### <a id="Tracon_TraconAttachmentOptions_AllowedMediaTypes"></a> AllowedMediaTypes

Gets allowed MIME types. A subtype wildcard such as `"audio/*"` is
accepted. Executable content types are deliberately excluded.

```csharp
public ISet<string> AllowedMediaTypes { get; }
```

#### Property Value

 [ISet](https://learn.microsoft.com/dotnet/api/system.collections.generic.iset\-1)<[string](https://learn.microsoft.com/dotnet/api/system.string)\>

### <a id="Tracon_TraconAttachmentOptions_MaxBytes"></a> MaxBytes

Gets or sets the largest byte count for one attachment. Defaults to 20 MB.

```csharp
public long MaxBytes { get; set; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)
