HomeError code lexicon › BR-CL-24
BR-CL-24 Field BT-125-1 Code list rules (BR-CL)

Fix BR-CL-24: Attachment mime code invalid

[BR-CL-24]-For Mime code in attribute use MIMEMediaType.

BR-CL-24 in your own invoice? Upload the file and find every error in seconds.

What does BR-CL-24 mean?

An embedded attachment must state its file type as a valid MIME type (e.g. application/pdf) so the recipient can open it.

Common causes of BR-CL-24

How to fix BR-CL-24

  1. Find the faulty spot in the XML. Open the XML of the invoice and go to field BT-125-1 along this XPath://ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@mimeCode
  2. Apply the fix. State the mime code of the embedded attachment (BT-125-1) in the mimeCode attribute. EN 16931 allows only these six values: 'application/pdf', 'image/png', 'image/jpeg', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' (xlsx), 'application/vnd.oasis.opendocument.spreadsheet' (ods). No file extension such as 'pdf'.
  3. Validate again. Save the file and validate it again to check that BR-CL-24 is no longer reported.
Concrete fix

State the mime code of the embedded attachment (BT-125-1) in the mimeCode attribute. EN 16931 allows only these six values: 'application/pdf', 'image/png', 'image/jpeg', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' (xlsx), 'application/vnd.oasis.opendocument.spreadsheet' (ods). No file extension such as 'pdf'.

XPath//ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@mimeCode

Before / after: the XML example

This is the spot in question before and after the fix (Cross Industry Invoice, ZUGFeRD/Factur-X).

Wrong
<ram:AttachmentBinaryObject mimeCode="pdf" filename="anhang.pdf">JVBERi0=</ram:AttachmentBinaryObject>
Correct
<ram:AttachmentBinaryObject mimeCode="application/pdf" filename="anhang.pdf">JVBERi0=</ram:AttachmentBinaryObject>

Frequent questions about BR-CL-24

Which mime codes are allowed for attachments?
Exactly six: 'application/pdf', 'image/png', 'image/jpeg', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' (xlsx) and 'application/vnd.oasis.opendocument.spreadsheet' (ods).
Is the file extension in the file name enough?
No. The file name sits in filename, but the checked value is the mimeCode attribute and it must be one of the six allowed MIME types, e.g. 'application/pdf'.

Related error codes

Check BR-CL-24 automatically

Instead of digging through the XML by hand you can validate your ZUGFeRD or XRechnung file online – upload the PDF or the XML and you get every error with rule ID, affected field, fix and XPath, as a readable report or as JSON through the API.

Find every error automatically instead of searching by hand

Upload your ZUGFeRD, Factur-X or XRechnung file – you get every violation back with rule ID, field, fix and XPath.

Validate online for free
Check invoice