# InteractionInput Methods

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [InteractionInput](/reference/api/csharp/aspire.hosting/interactioninput.md)
- Kind: `Methods`
- Members: `1`

Represents an input for an interaction.

<a id="getfiles"></a>

## GetFiles

- Name: `GetFiles`
- Returns: [InteractionFileCollection](/reference/api/csharp/aspire.hosting/interactionfilecollection.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting/IInteractionService.cs#L528)

Gets the files associated with this [InputType.File](/reference/api/csharp/aspire.hosting/inputtype/fields.md) input.

```csharp
public sealed class InteractionInput
{
    public InteractionFileCollection GetFiles()
    {
        // ...
    }
}
```

## Returns

[InteractionFileCollection](/reference/api/csharp/aspire.hosting/interactionfilecollection.md) -- A disposable collection of uploaded files. Disposing the collection deletes the uploaded files from disk.

## Remarks

The caller owns the returned collection and must dispose it when the files are no longer needed to delete the temporary files before AppHost shutdown. After disposal, the file metadata remains available but new content reads cannot be started. Streams opened before disposal remain usable until those streams are disposed. Files that are not disposed are deleted when the AppHost shuts down.

## ATS metadata

### Ignored by ATS

- Reason: InteractionFileCollection owns server-local files and implements IDisposable, which is not ATS-compatible.
