# DownloadData

```python
gradio.DownloadData(···)
```

### Description

The gr.DownloadData class is a subclass of gr.EventData that specifically carries information about the `.download()` event. When gr.DownloadData is added as a type hint to an argument of an event listener method, a gr.DownloadData object will automatically be passed as the value of that argument. The attributes of this object contains information about the event that triggered the listener.

### Example Usage

```python
import gradio as gr
def on_download(download_data: gr.DownloadData):
    return f"Downloaded file: {download_data.file.path}"
with gr.Blocks() as demo:
    files = gr.File()
    textbox = gr.Textbox()
    files.download(on_download, None, textbox)
demo.launch()
```

### Attributes

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `target` | `Block \| None` | `` | The component object that triggered the event. Can be used to distinguish multiple components bound to the same listener. |
| `data` | `FileDataDict` | `` |  |
