basalt / storage/src / DiskOptions
Interface: DiskOptions
Defined in: storage/src/index.ts:281
Properties
imageProcessor?
> optional imageProcessor?: ImageProcessor
Defined in: storage/src/index.ts:317
Engine that backs disk.image(...). Injected by storagePlugin.
maxTemporaryUploadUrlTtl?
> optional maxTemporaryUploadUrlTtl?: DurationInput
Defined in: storage/src/index.ts:315
Upper bound for temporaryUploadUrl lifetimes. Default: the smaller of 1 hour (DEFAULT_MAX_TEMPORARY_UPLOAD_URL_TTL) and maxTemporaryUrlTtl; an explicit value wins. A longer request throws TemporaryUrlTtlTooLongError (400).
maxTemporaryUrlTtl?
> optional maxTemporaryUrlTtl?: DurationInput
Defined in: storage/src/index.ts:308
Upper bound for temporaryUrl lifetimes. Default 7 days (DEFAULT_MAX_TEMPORARY_URL_TTL); a longer request throws TemporaryUrlTtlTooLongError (400).
onMissingScope?
> optional onMissingScope?: "error" | "root"
Defined in: storage/src/index.ts:302
What an operation does when the scope resolves nothing (no tenant in context): 'root' uses the caller's key against the disk root — where every tenant's tenants/<id>/ tree lives; 'error' throws StorageTenantRequiredError.
Default: 'error' for every disk with a scope (the default one or a custom one). The single exception is a storagePlugin disk on the default scope in an app that did NOT register @basaltkit/tenancy — a single-tenant app, where the root is the only tree there is. A hand-built new Disk() cannot know whether tenancy exists, so it fails closed. An explicit value always wins; a disk that is central on purpose should say scope: null.
scope?
> optional scope?: (() => string | undefined) | null
Defined in: storage/src/index.ts:287
Dynamic path prefix resolved on every operation. The default reads ctx().tenant.id — automatic tenant isolation (tenants/<id>/). Pass null to disable (a deliberately central disk: backups, branding).