# BR-CL-24 Attachment MIME code must be a valid MIME media type

The MIME code of an embedded attachment (BT-125-1) must use the MIMEMediaType code list; XRechnung restricts it to a small set of allowed types.

## Problem Description

The MIME code of an embedded attachment (BT-125-1) must use the MIMEMediaType code list; XRechnung restricts it to a small set of allowed types.

> **ERROR**: XRechnung 3.0

## Context and Significance

This EN16931 core code-list rule, tightened by XRechnung, ensures attachments open in standard viewers on the receiving side.

## Solution

Use one of the allowed MIME types: application/pdf, image/png, image/jpeg, text/csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet or application/vnd.oasis.opendocument.spreadsheet.

- validate
- convert

## Valid Examples

- BT-125-1 = application/pdf
- BT-125-1 = image/png

## Invalid Examples

- BT-125-1 = application/zip — not in the allowed set
- BT-125-1 = pdf — not a full MIME media type

## Code Examples

### Valid XML
```
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="invoice.pdf">...</cbc:EmbeddedDocumentBinaryObject>
```

### Invalid XML
```
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/zip" filename="invoice.zip">...</cbc:EmbeddedDocumentBinaryObject>
```

## Affected Fields

- [BT-125-1 Attached document Mime code](/resources/xrechnung/bt-125-attached-document)

## Validation Tools

- [Official KoSIT Validator](https://erechnungsvalidator.service-bw.de/): Validate your XRechnung files against all BR-DE rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Automatic validation error fixes when converting.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [Complete Error List](/resources/kosit-validator-errors): Overview of all German XRechnung validation rules.
