Skip to Content

Host Minio helpers

These helpers support host-side S3-compatible storage (for example Minio) without putting credentials on the QA wire.

HostMinioOptions (from bootstrap types)

FieldDescription
endpointURL or host:port string (see parser rules below).
regionOptional region string.
accessKeyId / secretAccessKeyProcess-local credentials.
bucketTarget bucket.
forcePathStyleOptional path-style addressing flag.

Never include these fields in BOOTSTRAP JSON.

parseHostMinioEndpoint(host)

Returns ParsedHostMinioClientConfig with endPoint, port, useSSL, accessKey, secretKey, region, pathStyle suitable for constructing a Minio Client.

putBufferAndPresignGetUrl(host, input)

type PutBufferAndPresignGetInput = { objectKey: string buffer: Buffer contentType: string getExpirySeconds?: number // default 24h }

Dynamic-imports the minio peer dependency, uploads bytes, then returns { getUrl, objectKey } where getUrl is a presigned GET URL.

Typical use

Host HTTP routes (outside the SDK) accept tenant uploads, call putBufferAndPresignGetUrl, then return HTTPS URLs suitable for __qaFileUrl on subsequent RPC calls — with fileUrl.allowedHosts configured to trust your presigned hostname.

See also