Skip to content

OptionsType

OptionsType = object

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:17

optional concurrency?: number

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:23

Maximum number of pieces streamed to the provider at the same time. Defaults to 4.


dataSet: PdpDataSet

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:19

The data set to add the pieces to.


optional limiter?: Limiter

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:25

Decides whether pieces still fit in one add-pieces request. Defaults to addPiecesFits.


optional onHash?: (txHash) => void

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:29

Called once per add-pieces transaction hash.

Parameter Type
txHash string

void


optional onProgress?: (index, bytesUploaded) => void

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:27

Called as a piece makes upload progress.

Parameter Type
index number
bytesUploaded number

void


pieces: InputPiece[]

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:21

The pieces to upload. Each becomes one piece in the data set.


optional signal?: AbortSignal

Defined in: packages/synapse-core/src/sp/upload-pieces.ts:31

The signal to abort the uploads and the confirmation wait.