Skip to content

basalt / files/src / FilesOptions

Interface: FilesOptions ​

Defined in: files/src/files.ts:152

Properties ​

checkQuota? ​

> optional checkQuota?: (tenantId, size) => void | Promise<void>

Defined in: files/src/files.ts:160

Custom quota check — throw to reject (e.g. wire @basaltkit/subscriptions).

Parameters ​

tenantId ​

string

size ​

number

Returns ​

void | Promise<void>


disk ​

> disk: Disk

Defined in: files/src/files.ts:153


hooks? ​

> optional hooks?: HookBus

Defined in: files/src/files.ts:155


maxTotalBytes? ​

> optional maxTotalBytes?: number

Defined in: files/src/files.ts:158

Max total bytes per tenant (a built-in quota).


now? ​

> optional now?: () => number

Defined in: files/src/files.ts:168

Returns ​

number


requireScan? ​

> optional requireScan?: boolean

Defined in: files/src/files.ts:167

Quarantine until scanned: download() and temporaryUrl() throw FileNotScannedError (423) until markScanned reports the file clean, and FileInfectedError (403) once it reports it not clean. Default false — scan results are recorded but do not gate access.


store? ​

> optional store?: FileStore

Defined in: files/src/files.ts:154


validate? ​

> optional validate?: FileValidation

Defined in: files/src/files.ts:156

Released under the MIT License.