Skip to main content
Version: Next

Interface: DownloadOptions

Defined in: fetcher/fetcher.ts:31

Options controlling a download call.

Properties​

forceDownload?​

optional forceDownload: boolean

Defined in: fetcher/fetcher.ts:44

Re-downloads every remote source even when it is already cached, replacing the cached copy. Use to recover from a corrupted file or to pick up a model that changed behind a stable URL.


onProgress()?​

optional onProgress: (progress) => void

Defined in: fetcher/fetcher.ts:33

Called with overall progress in [0, 1] as bytes arrive.

Parameters​

progress​

number

Returns​

void


signal?​

optional signal: any

Defined in: fetcher/fetcher.ts:38

Aborts the download. The bytes fetched so far are kept so a later download of the same source resumes instead of restarting.