File
What it indexes
The File connector uploads one or more files into OpenCore-managed storage and indexes each recognized file as a document. It is a load-state connector with no scheduled refresh or source system to poll.
The normal Admin flow accepts multiple files and does not apply a file-extension filter in the browser. Uploading bytes successfully therefore does not guarantee that the connector will emit an indexed document.
Metadata timing affects document IDs. An id supplied by .onyx_metadata.json is processed before the document ID is chosen and can set it. First-line inline ONYX_METADATA is extracted later, after the document ID has already been fixed, so an inline id does not replace the ZIP-provided or generated document ID.
Prerequisites
- Prepare files with one of the supported extensions and validate that their contents match the extension.
- For encrypted PDFs, note that the normal Admin File flow creates an empty internal credential and exposes no PDF-password field. Use an unencrypted copy unless your deployment has a separate supported ingestion path.
- For ZIP metadata, put exactly one
.onyx_metadata.jsonat the archive root and use JSON keyed by filename or a list whose entries containfilename. - Ensure the file-store and indexing workers can hold and process the upload. The File upload handler does not enforce a connector-specific byte limit. The current
MAX_FILE_SIZE_BYTESindexing check only logs when a constructed document exceeds the configured value; it does not reject the upload or skip that document. - Apply deployment ingress, storage, memory, and worker limits appropriate to your environment, then test representative large PDFs, spreadsheets, images, and archives before broad use.
Credentials
Do not upload access tokens, private keys, or source-system credentials as ordinary content. A File connector indexes content; it does not use a file as an authentication credential.
Configure in OpenCore
- In the Admin panel, open Connectors, select File, and enter a descriptive connector name.
- Select one or more files. A ZIP is expanded by default; include at most one ZIP in the upload.
- If metadata is required, use either the first-line
ONYX_METADATAprotocol marker in a supported plain-text file or an archive-root.onyx_metadata.jsonfile.ONYX_METADATAis a legacy protocol field, not the product brand, and must retain this exact spelling for compatibility.
Parsed protocol fields are id, connector_type, link, file_display_name, title, primary_owners, secondary_owners, and doc_updated_at. If a stable document ID is required, put id in .onyx_metadata.json; an inline id is parsed too late to change the document ID.
ZIP metadata is applied first. For source type, owners, update time, display name, title, and link, only non-empty inline values replace earlier values because the connector uses fallback (or) selection; an empty inline value cannot clear a ZIP value. Inline custom tags update same-named ZIP custom tags.
Custom tags contain keys outside the reserved exclusion list. The reserved fields document_id, time_updated, doc_updated_at, link, primary_owners, secondary_owners, filename, file_display_name, title, connector_type, pdf_password, and mime_type are excluded from custom tags. document_id and time_updated are not parsed aliases for id and doc_updated_at. Under the current compatibility parser, id itself is not excluded from custom tags, even though ZIP-level id can also set the document ID.
- Select OpenCore Private groups for restricted files. Choose Public only when every OpenCore account may search every file in the connector.
- Create the connector. The UI uploads the files, creates the connector and internal empty credential, links them with the selected access, and starts one indexing run.
- To revise an existing File connector, add or remove files in its management view. At least one file must remain; additions trigger update indexing and removals trigger pruning.
Permissions
File contents and ONYX_METADATA owner fields do not create source ACLs. primary_owners and secondary_owners are document metadata only. File is not an Auto Sync Permissions source in the current Admin access selector.
Search access is controlled only by the connector’s OpenCore Private groups or Public mode. Every user with connector access can search every emitted document in that File connector. Split files into separate connectors when audiences differ.
File-management authorization is separate from search access. All three File management endpoints first require a curator or admin session. Upload proceeds after that role gate. Listing then checks connector access; updating then checks editable access. A global curator has a special update allowance for a Public File connector, but not for an unrelated Private connector. An ordinary connector user cannot list or update files through these Admin endpoints merely because the user can search the connector. These management rules do not create per-document search permissions.
Verify
- After creation, confirm the upload returns stored file names and the indexing attempt completes.
- Search a distinctive title and sentence from each supported file type in the batch.
- Confirm an unsupported-extension test file is absent even if upload storage accepted it.
- For CSV, TSV, XLSX, or XLSM, inspect the extracted table and test raw-file analysis if code-interpreter staging is part of your deployment.
- For a ZIP, compare extracted file names with the archive. Confirm hidden path entries and
.onyx_metadata.jsonare not indexed as documents. - With ZIP metadata, verify that
idsets the document ID. Then test a file with only an inlineid: its document ID must remain generated, while the current parser can retainidas a custom tag. Also verifytitle, link, owner metadata,doc_updated_at, one non-reserved custom tag, and the absence of reserved fields from custom tags. Use non-sensitive values. - Test every assigned OpenCore group and a user outside those groups. Metadata owners must not change the result.
- Add one file and remove one file from an existing connector, then verify the new document appears and the removed document is pruned.