Enneo

Files connector

Replace the binary of a file

POST /knowledgeSource/filesConnector/{id}/replace

POST /knowledgeSource/filesConnector/{id}/replace

Replaces the binary backing an existing file knowledge_source. The KS id is preserved (so embeddings keep their identity in downstream stores); the row's name, title, source and data.original* fields are refreshed to match the new file.

The new file may have a different filename and extension from the previous one — replace is keyed by KS id, not by filename. A 422 is returned if the new filename collides with another active file in the same folder.

Side-effects mirror an initial upload: the old S3 object is removed, the new binary is stored under the same KS id, Markdown is re-parsed (Firecrawl / Cortex vision / plaintext depending on extension), page thumbnails are regenerated, and data.hasManualMarkdownEdits is reset to false. A knowledgeSourceChanged action=update event is emitted so Cortex re-embeds the new content.

Path parameters

idintegerpathrequired

Knowledge source ID

Responses

200 — File replaced successfully

Response Example

{
  "success": true,
  "id": 42
}

400 — Incomplete upload (partial transfer)

404 — File knowledge source not found

413 — File size exceeds limit

422 — No file provided, unsupported type, MIME spoofing, archived file, or the new filename collides with another active file in the same folder.

500 — Internal error