> For the complete documentation index, see [llms.txt](https://pode.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pode.gitbook.io/docs/functions/attach.md).

# Attach

## Description

The `attach` function allows you to attach file in the `/public` directory onto the web response. This allows the files to be downloaded by the end-user.

## Examples

1. The following example attaches the installer found at `/public/downloads/installer.exe` onto the response, when the `http://localhost:8080/app/install` endpoint is hit:

   ```
    Server {
        listen *:8080 http

        route get '/app/install' {
            attach 'downloads/installer.exe'
        }
    }
   ```

## Parameters

| Name | Type   | Required | Description                                                          | Default |
| ---- | ------ | -------- | -------------------------------------------------------------------- | ------- |
| Path | string | true     | The path to the file to attach, relative to your `/public` directory | null    |
