Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / storage / DiskServeConfig

Interface: DiskServeConfig

Defined in: storage/types.ts:55

How a disk is exposed over HTTP by StorageFilesMiddleware.

Omit it and the disk is not reachable over the network at all — which is the right default for anything holding private uploads.

Properties

path

path: string

Defined in: storage/types.ts:57

URL prefix the disk is served under, e.g. /storage.


signed?

optional signed?: boolean

Defined in: storage/types.ts:64

Require a valid ?expires=&signature= on every request, as produced by temporaryUrl(). Use it to expose a private disk without making it public: only someone holding a link you signed can read a file, and only until it expires.


expiresIn?

optional expiresIn?: number

Defined in: storage/types.ts:69

How long a signed link stays valid, in seconds. Only meaningful with signed. Defaults to 900 (15 minutes).


headers?

optional headers?: Record<string, string>

Defined in: storage/types.ts:71

Extra response headers, e.g. Cache-Control.