maybeExternalizeBatch
function maybeExternalizeBatch( batch, config?,onUpload?): Promise<VgiBatch>;Defined in: src/external.ts:142
Maybe externalize a batch if it exceeds the threshold. Returns the original batch unchanged if below threshold or no config.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
batch |
VgiBatch |
- |
config? |
| ExternalLocationConfig | null |
- |
onUpload? |
(bytes) => void |
Called with the number of bytes actually uploaded. Counted here rather than at the call sites: this is the one function every externalised payload passes through, so the total cannot drift from reality by someone adding a new upload path. |
Returns
Section titled “Returns”Promise<VgiBatch>
