# uploadPiece

> **uploadPiece**(`options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>

Defined in: [packages/synapse-core/src/sp/upload.ts:42](https://github.com/FilOzone/synapse-sdk/blob/7004ea9b9f1577216826ff17bb7f17f4873d9057/packages/synapse-core/src/sp/upload.ts#L42)

Upload a piece to the PDP API.

POST /pdp/piece

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/sp/namespaces/uploadpiece/type-aliases/optionstype/) | [uploadPiece.OptionsType](/reference/filoz/synapse-core/sp/namespaces/uploadpiece/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`void`\>

## Throws

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