# AttachmentContent

> 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.attachmentcontent/
> Summary: AttachmentContent: The content of a new attachment to be saved into the store.

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

The content of a new attachment to be saved into the store.

```csharp
public sealed class AttachmentContent
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.attachmentcontent/">AttachmentContent</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

The content is carried already read into memory, because it stays under the size
limit (20 MB by default); the store layer does not deal with streaming. The type
itself is not a `record`: the [AttachmentContent.Data](/api/tracon.attachmentcontent/#Tracon_AttachmentContent_Data) field can be large, and the
generated `ToString` and equality comparison must not copy the whole content
by accident.

## Constructors

### <a id="Tracon_AttachmentContent__ctor"></a> AttachmentContent\(\)

```csharp
public AttachmentContent()
```

## Properties

### <a id="Tracon_AttachmentContent_CreatedBy"></a> CreatedBy

Gets the actor that uploaded it, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when it is unknown.

```csharp
public string? CreatedBy { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_AttachmentContent_Data"></a> Data

Gets the raw content.

```csharp
public required ReadOnlyMemory<byte> Data { get; init; }
```

#### Property Value

 [ReadOnlyMemory](https://learn.microsoft.com/dotnet/api/system.readonlymemory\-1)<[byte](https://learn.microsoft.com/dotnet/api/system.byte)\>

### <a id="Tracon_AttachmentContent_FileName"></a> FileName

Gets the original file name.

```csharp
public required string FileName { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_AttachmentContent_MediaType"></a> MediaType

Gets the validated MIME type.

```csharp
public required string MediaType { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_AttachmentContent_RunId"></a> RunId

Gets the run that produced the attachment. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for a user upload.

```csharp
public Guid? RunId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)?

### <a id="Tracon_AttachmentContent_SessionId"></a> SessionId

Gets the session the attachment is bound to. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for an upload without a session.

```csharp
public string? SessionId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)?

### <a id="Tracon_AttachmentContent_TenantId"></a> TenantId

Gets the tenant the attachment will belong to.

```csharp
public required string TenantId { get; init; }
```

#### Property Value

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