Skip to main content

Interface: IFileStoreConfig

Defined in: internal/file-store/types.ts:4

Configuration of the FileStore. Lands in IAIGatewayConfig.fileStore.

Properties​

adapter​

adapter: IBlobAdapter

Defined in: internal/file-store/types.ts:6

Blob backend; S3-compatible or the platform's storage service.


allowedMime?​

optional allowedMime?: string[]

Defined in: internal/file-store/types.ts:36

Allowed MIME types; x/* allows every subtype.

What the models can read, and nothing that runs where it is shown.

image/* also allows image/svg+xml, which can carry a script: allow it only when the files are never shown inline from an origin the app trusts.

Example​

["application/pdf"] - a document assistant that takes no images

Default​

["image/png", "image/jpeg", "image/webp", "image/gif", "application/pdf"]

maxBytes?​

optional maxBytes?: number

Defined in: internal/file-store/types.ts:23

The largest upload accepted, in bytes; a larger file is a 413.

Size it for what the models take: a PDF of many pages, a photo from a phone.

Example​

5 * 1024 * 1024 - a chat that takes screenshots only

Default​

20 * 1024 * 1024 (20 MB)

path​

path: string

Defined in: internal/file-store/types.ts:13

The folder, inside a tenant's folder, that the files of the gateway are stored under — like a file-system path with any number of folders: "apps/crm/ai-files". A file is stored at ///. No default: where the files live is decided where the gateway is configured. It may be an empty string (the files are then at //) and may begin or end with "/": the key never gets a doubled "//".