# upload

> **upload**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `pieces`: `object`[]; `statusUrl`: `string`; `txHash`: `` `0x${string}` ``; \}\>

Defined in: [packages/synapse-core/src/sp/upload.ts:53](https://github.com/FilOzone/synapse-sdk/blob/7fdc04df4e3c52366a9f0cd55da4c05e20b2ed82/packages/synapse-core/src/sp/upload.ts#L53)

Upload multiplepieces to a data set on the PDP API.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`, `Account`\> | The client to use to upload the pieces. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/upload/type-aliases/optionstype/) | [upload.OptionsType](/reference/filoz/synapse-core/sp/namespaces/upload/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<\{ `pieces`: `object`[]; `statusUrl`: `string`; `txHash`: `` `0x${string}` ``; \}\>

Upload response [upload.OutputType](/reference/filoz/synapse-core/sp/namespaces/upload/type-aliases/outputtype/)

## Throws

Errors [upload.ErrorType](/reference/filoz/synapse-core/sp/namespaces/upload/type-aliases/errortype/)