06 Upload Document File
Ship the raw file itself to the backend, not just its text
- session
- file_path_link
- json
- document_id
- document_id_link
- filename
- filename_link
- size_bytes
- success
- refresh
- document_ids
- filenames
- selectable_items
- indexed_items
- item_count
Ingest extracts text locally and saves the words. This node saves the file itself. "06 Upload Document File" reads a local file, base64-encodes it, and uploads the whole thing to the ZMongo backend as a document record - bytes included, case_id and metadata attached. The distinction matters: if your pipeline needs to preserve the original PDF or DOCX (for legal-style document handling, archiving, or OCR on the server), you want Upload, not Ingest. Ingest keeps the text; Upload keeps the document.
How it works
It reads the file at file_path (or the file_path_link from "06 Document File Browser"), base64-encodes it, and POSTs /api/upload with the filename, content type, encoded data, an optional case_id, metadata_json, and - usefully - a known_text field where you can attach text you already have, so a record can carry both the binary and its transcription in one place. There's a default 64 MB upload cap (ZMONGO_DOCUMENT_NODE_MAX_UPLOAD_BYTES), and case_id is this pack's nod to organizing documents into cases/collections of related files.
Outputs: document_id and document_id_link (the record's identity for later), filename / filename_link, size_bytes (how much was actually uploaded), success, plus document_ids and filenames list tails and the selectable tail.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/CentralFloridaAttorney/ComfyUI-ZMongo
Restart ComfyUI, or install "ComfyUI-ZMongo" via ComfyUI Manager. Unlike Ingest, this node has no heavy extraction dependencies - it just ships bytes.
Where people get burned
The same "machine running ComfyUI" rule as the File Browser, and the node is unrelenting about it: the file must exist on the ComfyUI box, not on your laptop. If you're pointing at a path you can see in your browser but ComfyUI runs elsewhere, it will fail with "file not found" every time. Also - and the checks in the error payload call this out - connect file_path_link from the File Browser, not browser_root or a directory path. Directories are rejected on purpose; it wants a real file.
Second, the upload is to the hosted backend. In pure Local File Store mode there's no /api/upload route, so this node's natural home is the hosted ZMongo/BPA setup where server-side processing (including OCR) runs. If you're entirely local and just want text searchable, Ingest is the lighter tool. If you're building the hosted-document pipeline this pack is clearly aimed at, Upload + Queue OCR is the intended pairing - the server keeps the file and can run OCR on it later.
And keep the 64 MB cap in mind for big files. Over it, the upload fails - split the file or process it elsewhere.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| session | ZMONGO_API_SESSION | — | |
| file_path | STRING | — | |
| case_id | STRING | — | |
| metadata_json | STRING | {} | — |
| document_prefix | STRING | /documents | — |
| file_path_linkopt | * | — | |
| known_textopt | STRING | — | |
| refresh_tokenopt | STRING | — |
Outputs (13)
| Name | Type | Description |
|---|---|---|
| json | STRING | — |
| document_id | STRING | — |
| document_id_link | ZMONGO_DOCUMENT_ID | — |
| filename | STRING | — |
| filename_link | ZMONGO_FILENAME | — |
| size_bytes | INT | — |
| success | BOOLEAN | — |
| refresh | STRING | — |
| document_ids | * | — |
| filenames | * | — |
| selectable_items | * | — |
| indexed_items | STRING | — |
| item_count | INT | — |