Bug Description
The README documents that for binary ingestion, name is required for
MIME-type detection:
// Binary (name is required for MIME detection)
And gives this exact example:
await c.add({ type: "binary", bytes: buffer, name: "report.pdf" }, "my-dataset");
However, calling add() with a .pdf filename fails immediately:
Error: runtime error: add failed: task 0 failed after 1 attempt(s):
Unsupported document type at ingest: pdf
Confirmed: detection works as documented, but PDF isn't supported by it
I verified the documented mechanism (filename extension → MIME detection)
works correctly for other types — using the exact same buffer content
(genuine plain text), only changing the name extension:
const buffer = readFileSync("testing.txt");
// Fails — "Unsupported document type at ingest: pdf"
await cognee2.add({ type: "binary", bytes: buffer, name: "news.pdf" }, "dataset-a");
// Succeeds fully — same buffer, only the extension changed
await cognee2.add({ type: "binary", bytes: buffer, name: "testing.txt" }, "dataset-b");
So the documented "name → MIME detection" mechanism is working correctly
in general — the gap is specifically that .pdf isn't supported by it,
despite being the README's own worked example for this exact feature.
Why this matters
Any user following the README's own binary-ingestion example verbatim
(which explicitly uses .pdf) will hit an immediate failure. Either PDF
support is missing from the ingestion pipeline, or the README's example
should use a currently-supported extension instead.
Environment
- Package: @cognee/cognee-ts@0.1.3
- OS: Windows 11
Bug Description
The README documents that for binary ingestion,
nameis required forMIME-type detection:
And gives this exact example:
However, calling
add()with a.pdffilename fails immediately:Confirmed: detection works as documented, but PDF isn't supported by it
I verified the documented mechanism (filename extension → MIME detection)
works correctly for other types — using the exact same buffer content
(genuine plain text), only changing the
nameextension:So the documented "name → MIME detection" mechanism is working correctly
in general — the gap is specifically that
.pdfisn't supported by it,despite being the README's own worked example for this exact feature.
Why this matters
Any user following the README's own binary-ingestion example verbatim
(which explicitly uses
.pdf) will hit an immediate failure. Either PDFsupport is missing from the ingestion pipeline, or the README's example
should use a currently-supported extension instead.
Environment