# Attachment

Attached document data

Canonical URL: https://docs.paradoc.dev/schemas/primitives/attachment/

An Attachment is a structured primitive that identifies a file. It is used at runtime to specify a [Form Annex](/schemas/artifacts/form/annex) that is attached to a [Form](/schemas/artifacts/form).

## Properties

| Name | Type | Description |
| --- | --- | --- |
| `name` | `string` | Original file name |
| `mimeType` | `string` | MIME type of the attached file |
| `checksum?` | `string` | SHA-256 checksum for integrity verification |

## Examples

Attachments are stored as a record keyed by the annex identifier (the key from `form.annexes`):



**YAML**

```yaml
annexes:
  governmentId:
    name: drivers-license.pdf
    mimeType: application/pdf
    checksum: "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

  proofOfIncome:
    name: pay-stubs.pdf
    mimeType: application/pdf
```

**JSON**

```json
{
  "annexes": {
    "governmentId": {
      "name": "drivers-license.pdf",
      "mimeType": "application/pdf",
      "checksum": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
    },
    "proofOfIncome": {
      "name": "pay-stubs.pdf",
      "mimeType": "application/pdf"
    }
  }
}
```

## Related

* [FormAnnex](/schemas/artifacts/form/annex) - Design-time annex slot definitions
