Skip to content

invalid-file-type

HTTP 400 Bad Request

The uploaded file is not of a type this endpoint accepts. Nothing is stored. detail names the reason.

Triggers

  • Files and DPP documents: POST /v1/files/upload, PUT /v1/files/:id and POST /v1/dpp/:id/documents accept PDF, PNG, JPEG, WebP, MP4, glTF/GLB and JSON. The API checks the first bytes of the file, not its name. It refuses any other type, a file whose content does not match its declared Content-Type (a .pdf that is not a PDF) and an empty file.
  • Product images: POST /v1/dpp/:id/images accepts only JPEG, PNG and WebP.
  • Code import: POST /v1/codes/import accepts only CSV or XLSX, recognised by Content-Type or file extension.
{
"type": "https://docs.qr3.app/errors/invalid-file-type",
"title": "Invalid File Type",
"status": 400,
"detail": "Magic bytes indicate PDF but Content-Type does not match"
}

← Error Reference