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

# Attachments

> Attach text documents to a ModelHub message: supported file types, size and length limits, how files are scanned and masked, and every error you can hit.

You can attach documents to a message so the model can read them. Each document is turned into text, scanned for personal data, and masked in the same pass as your typed message before the model sees it.

## Adding a file

Any of these work:

* Click the paperclip (**Attach a file**) in the composer and pick one or more files.
* Drag files onto the composer. The border turns dashed and the box reads **Drop to attach…**.
* Paste files into the message box.

Each file appears as a chip above the message box. You can send a message with attachments and no typed text; ModelHub then sends "Please review the attached document." as your message.

## Supported files

| Type | Extensions | How text is read |
| - | - | - |
| Plain text | `.txt`, `.md`, `.markdown`, `.csv`, `.tsv`, `.json`, `.log` | Decoded as UTF-8, or UTF-16 when the file starts with a UTF-16 byte-order mark. A file that looks binary is rejected. |
| Word | `.docx` | The document body, then headers, footers, footnotes, endnotes and review comments. Table cells are separated by tabs. |
| PDF | `.pdf` | Selectable text from the pages. There is no OCR: scanned PDFs have no text to read. Password-protected PDFs are rejected. |

Images, spreadsheets in `.xlsx`, legacy `.doc`, slides and audio are not supported. The file picker only offers the supported extensions.

## Limits

| Limit | Value |
| - | - |
| Files per message | 5 |
| Size per file | 10 MB |
| Text per file, after extraction | 50,000 characters. Longer documents are cut and the chip shows "· first 50k of 212k chars" (with your numbers). Only the beginning is sent. |
| Text across all files in one message | 100,000 characters |
| File name | Cut to 120 characters; control characters and quotes are replaced with spaces |

## What the chip shows

| Chip text | Meaning |
| - | - |
| **Scanning…** | The file is being read and scanned. **Send** is disabled until every file finishes. |
| **No PII found** | Nothing was detected. |
| **N PII items** | Something was detected. Hover to see **Found in** *file name* with each finding's type and severity, and the note "Each value is replaced with a placeholder before the model reads the document." The text turns red if a finding is critical. |
| An error message in red | The file could not be used. See the table below. Remove the chip with its **×** button. |

If any attached file has a critical finding, the strip above the composer reads "A critical identifier was found in an attached file — it will be replaced before the model sees it." and the button changes to **Send masked**. Clicking it is your confirmation.

## How a document is used

1. **Upload.** The file goes to ModelHub, is read in memory, and its text is returned to your browser with a scan report. The file itself is not stored.
2. **Send.** The document text travels with your message. ModelHub joins your message and all documents into one piece of text and masks it in a single pass, so the same email address gets the same placeholder whether it appears in your message or in a CSV.
3. **Model.** The model receives the masked documents, each wrapped and labelled with its file name, plus an instruction to treat document contents as data supplied by you, not as instructions. A document cannot break out of its wrapper to pose as your message.
4. **Your bubble.** Your sent message shows one line per file, such as "Attached: q3-report.pdf", instead of the full text. File names are scanned too, so a file named after a person shows a placeholder.
5. **Follow-ups.** Later messages in the same conversation still include the masked documents as context.
6. **History.** The masked text of the documents is saved with that turn and shown when you reopen the conversation. The original text is not saved.

## Errors

| Message | Cause |
| - | - |
| Unsupported file type. Use .txt, .md, .markdown, .csv, .tsv, .json, .log, .pdf, .docx. | The extension is not supported. |
| Files are limited to 10 MB. | The file is over 10 MB. |
| This file is empty. | The file has zero bytes. |
| Up to 5 files per message. | You tried to add a sixth file. |
| Too much text across attachments. Remove one first. | The attached files together exceed 100,000 characters of text. |
| No selectable text in this PDF — it may be a scan. Paste the text instead. | The PDF has no text layer. |
| This PDF is password-protected. Remove the password and try again. | The PDF is encrypted. |
| This is not a valid PDF. | The file does not start like a PDF. |
| This file has no text in it. | Extraction found nothing. |
| This looks like a binary file, not text. | A non-text file was renamed to a text extension. |
| This .docx is not a valid Word document. / This .docx is damaged. / This .docx could not be opened. / This .docx has no document body. / This .docx uses an unsupported compression method. / This .docx could not be decompressed. | The Word file is corrupt or not a real `.docx`. Re-save it from Word and try again. |
| This file could not be read. | Any other extraction failure. |
| Upload failed — check your connection. | The upload did not reach ModelHub. |

## Tips

* Remove columns or pages you do not need before attaching. Everything you attach is billed as input tokens on every later message in the conversation.
* For scanned PDFs, copy the text out with an OCR tool first, or paste the relevant part into your message.
* Masking applies to documents exactly as it does to typed text. See [Privacy screening](/modelhub/chat/privacy-screening) for what is detected.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.