Aller au contenu
Agentic Workflowdocs
v0.8.2Installer gratuitement

nœuds / builtin / ai / loaders

File Document Loader

Load a file (PDF, HTML, text) as text to feed into the Indexer

IA ExtensionApplication web

Ce contenu n’est pas encore disponible dans votre langue.

Turn a PDF, HTML or text file into plain text, ready to index into a knowledge base.

File Document Loader takes a file carried by the incoming item and puts its text in one output field, named by Output field name (text by default). It works out the file type from its MIME type, or else from the file name’s extension:

  • PDF: the text of all pages, joined into one string. Uses the same extraction as PDF Parser.
  • HTML: converted to clean plain text.
  • Text formats: CSV, JSON, XML, Markdown and TXT (and any text/ type) are read as they are.

It first looks for a file attachment under Binary key / field. If there is none, it reads a field of that name holding a base64 string or a data URL (data:application/pdf;base64,...).

  • Index a PDF report, a Markdown doc or an exported CSV into a knowledge base.
  • Handle a mix of PDF, HTML and text files with one node.
  • When you only need the text of a PDF and won’t index it, PDF Parser gives more control.
RéglageTypeCe que cela fait
Binary key / field TextThe binary attachment key on the input item (its $binary map), or a field holding a base64 / data-URL string. Par défaut : data
Output field name TextThe name of the output field that will hold the loaded text. Par défaut : text
Options GroupThe options for the node.
Options › MIME type TextOverride / hint for the MIME type. Required when loading a raw base64 string with no data-URL prefix.
Options › File name TextFile name hint — its extension is used to dispatch when no MIME type is known.
Options › Include input fields ToggleWhether to include the original input fields in the output. Par défaut : Off
  • Binary key / field is the name only, not an expression: for example content, not {{ $input.content }}.
  • A data URL already says its type. For a plain base64 string, set MIME type (for example application/pdf) or a File name such as report.pdf.
  • Output

Each item has the file’s text in the field you named (default text). With Include input fields on, the incoming fields are kept next to it, which is handy to reuse the file name as Source name on the Indexer.

None. This node needs no connection and has no slots for other nodes.

  1. Local File Read with Read as Data URL and Accepted file types .pdf, .md lets you pick a file. Its content arrives in content and its name in name.
  2. File Document Loader with Binary key / field content, Output field name text and Include input fields on.
  3. Indexer with Input {{ $input.text }} and Source name {{ $input.name }}. Connect Local Knowledge to Knowledge and Recursive Character Text Splitter to Text Splitter.
  • “No source node is connected to this node.” The loader needs an incoming item that carries the file. Connect the node that provides it.
  • “No binary attachment or field “…” found on the input item…“. Nothing is stored under Binary key / field. Check the field name in the previous node’s output and type it exactly.
  • “Unsupported document type (mimeType: unknown, fileName: unknown)…”. The loader can’t tell the file type. Set MIME type or File name, or convert the file to PDF, HTML or text first. Word and image files are not supported.
  • The text is empty for a PDF. The PDF is a scanned image with no text layer. Run it through text recognition first.
Modifier cette page

Dernière mise à jour :

Was this page useful?
Demander à Aria à propos de File Document Loader