# BR-DE-22 Embedded attachment filenames must be unique

XRechnung requires every embedded document filename attribute to be unique within the invoice.

## Problem Description

XRechnung requires every embedded document filename attribute to be unique within the invoice.

> **ERROR**: XRechnung 3.0

## Context and Significance

Duplicate attachment names make downstream document handling ambiguous and can cause recipient portals to reject otherwise valid XML.

## Solution

Rename duplicate attachments before export, for example terms.pdf and timesheet.pdf instead of two files named attachment.pdf.

- validate
- convert

## Valid Examples

- invoice-terms.pdf and delivery-note.pdf

## Invalid Examples

- Two embedded files both named attachment.pdf

## Technical Details

### Affected Fields
BG-24 Additional supporting documents, EmbeddedDocumentBinaryObject filename

## Related Rules

- [BR-DE-21](/resources/kosit-validator-errors/br-de-21-specification-identifier-must-be-provided)

## 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.
