# InteractionFileCollection Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [InteractionFileCollection](/reference/api/csharp/aspire.hosting/interactionfilecollection.md)
- Kind: `Methods`
- Members: `2`

Represents the uploaded files associated with an interaction input.

<a id="dispose"></a>

## Dispose

- Name: `Dispose`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting/IInteractionService.cs#L588-L600)

Deletes the uploaded files from disk and prevents new content reads. Streams that are already open remain usable until those streams are disposed.

```csharp
public sealed class InteractionFileCollection
{
    public void Dispose()
    {
        // ...
    }
}
```

<a id="getenumerator"></a>

## GetEnumerator

- Name: `GetEnumerator`
- Returns: [IEnumerator<InteractionFile>](/reference/api/csharp/aspire.hosting/interactionfile.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting/IInteractionService.cs#L577)

Returns an enumerator that iterates through the uploaded files.

```csharp
public sealed class InteractionFileCollection
{
    public IEnumerator<InteractionFile> GetEnumerator()
    {
        // ...
    }
}
```

## Returns

[IEnumerator<InteractionFile>](/reference/api/csharp/aspire.hosting/interactionfile.md) -- An enumerator for the uploaded files.
