Skip to main content
ExuluStorage is a class that wraps the platform’s S3-compatible object storage. It uses the same configuration as the IMP server’s Uppy-based upload pipeline, so files written through ExuluStorage are accessible from the same bucket the platform uses for attachments and knowledge items. You do not instantiate ExuluStorage directly — you receive an instance through the utils.storage object passed to ExuluContext processors and chunker operations.

Constructor

ExuluConfig
required
The application config object from ExuluApp. Passed automatically by the platform to processor and chunker callbacks.

API surface

getPresignedUrl

Returns a presigned GET URL for a stored object. The key must be in the format <bucket>/<object-path>.
string
required
S3 key in <bucket>/<object-path> format (e.g. "uploads/documents/report.pdf"). Throws when the bucket or key portion is empty.
Promise<string>
A time-limited presigned URL the caller can use to download the object directly from S3.

uploadFile

Uploads a file to S3 and returns the stored object key.
Buffer | Uint8Array
required
The file content to upload.
string
required
The target file name (used to derive the object key in the bucket).
string
required
MIME type (e.g. "application/pdf", "image/png"). Stored as the object’s Content-Type.
number
Numeric user ID. Stored as metadata on the S3 object when provided.
Record<string, string>
Additional key-value metadata stored on the S3 object.
string
Override the default bucket. When omitted the platform’s configured default bucket is used.
Promise<string>
The S3 object key under which the file was stored.

Example

Inside a custom ExuluContext processor:

Notes

  • ExuluStorage is exposed through utils.storage inside context processors and chunker operations — you do not need to import or instantiate it directly.
  • The getPresignedUrl key parsing expects exactly one / separating the bucket from the object path. Multi-level paths (bucket/folder/file.pdf) are handled correctly.