> ## Documentation Index
> Fetch the complete documentation index at: https://help.teable.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Attachment

> Store images, PDFs, documents, and other files in records, with support for preview, download, and batch download.

The **Attachment** field stores one or more files in a record. Common use cases include contracts, images, invoices, design files, resumes, reports, and images generated by AI fields.

## Use Cases

| Scenario                   | Good for                                                          |
| -------------------------- | ----------------------------------------------------------------- |
| File archive               | Contracts, invoices, reports, resumes, and other business files   |
| Image and asset management | Product images, campaign assets, design files, screenshots        |
| Form file collection       | Resumes, reimbursement receipts, and files submitted by customers |
| AI image output            | Image results generated by AI fields                              |

## Create and Configure

<Steps>
  <Step title="Choose the field type">
    In a table, click `+` to add a field, then choose **Attachment**.
  </Step>

  <Step title="Name the field">
    Enter a field name, such as "Files", "Images", or "Contract attachments".
  </Step>

  <Step title="Save the field">
    After saving, each record can upload one or more files in this field.
  </Step>
</Steps>

## Upload and View

Attachment fields can store images, PDFs, documents, archives, and other file types.

* **Upload files**: Click the attachment area in a cell or record detail, then choose local files to upload.
* **Store multiple attachments**: One attachment cell can contain multiple files.
* **Preview files**: Images and some file types can be previewed in the cell or record detail.
* **Download one attachment**: Open an attachment, then download the file.

<Note>
  Attachment fields store files, not plain text. When converting a text field to an attachment field, Teable cannot convert the original text into files. Check whether the data needs a backup before converting the field.
</Note>

## Batch Download Attachments

From the attachment field menu, you can download attachments from the current field as a ZIP file. The download scope follows the current table search results:

* If no search is active, Teable downloads downloadable attachments in this attachment field.
* If the table is searching and hiding unmatched rows, Teable only downloads attachments from matching records.

When downloading the ZIP, you can choose an attachment filename prefix:

| Prefix option                | Description                                                                                                        |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **Default index**            | Uses a system-generated index as the prefix, which helps keep file order clear                                     |
| **Select a field as prefix** | Uses another field value as the filename prefix, useful for organizing files by ID, customer name, or project name |
| **No prefix**                | Keeps the original filename where possible                                                                         |

If duplicate filenames appear in the ZIP file, Teable adds suffixes so each filename stays unique.

## Use with AI Fields

AI fields can read attachments and write generated images to attachment fields.

* **Read attachments**: In AI field settings, add the attachment field as an input field. Whether the AI field can recognize image or file content depends on the selected model.
* **Save images**: Set the AI field output to an attachment field. Generated images are saved to that field.

For more information, see [AI Field](/en/basic/field/ai/ai-field).

## Upload Attachments Through API

The attachment upload API supports local file upload and URL-based upload. New attachments are appended to the end of the target attachment field in the specified record.

See [Upload Attachment API](/en/api-doc/record/upload-attachment).
