# useUploadSimple

> **useUploadSimple**(`props`): `UseMutationResult`\<\{ `addMessageOk`: `true`; `confirmedPieceIds`: `bigint`[]; `confirmedTxHash?`: `` `0x${string}` ``; `dataSetId`: `bigint`; `pieceCount`: `number`; `piecesAdded`: `true`; `txHash`: `` `0x${string}` ``; `txStatus`: `"confirmed"`; \}, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), [`UseUploadSimpleVariables`](/reference/filoz/synapse-react/interfaces/useuploadsimplevariables/), `unknown`\>

Defined in: [synapse-react/src/warm-storage/use-upload-simple.ts:30](https://github.com/FilOzone/synapse-sdk/blob/a3c661408bf8b3cb47684059a425c07b9ae50a64/packages/synapse-react/src/warm-storage/use-upload-simple.ts#L30)

Upload files to a data set and add them in one request.

:::caution[Deprecated]
  Use [useUploadPieces](/reference/filoz/synapse-react/functions/useuploadpieces/), which streams each file, reports progress and returns the files that failed
instead of rejecting the whole upload.
  :::

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `props` | [`UseUploadSimpleProps`](/reference/filoz/synapse-react/interfaces/useuploadsimpleprops/) | The props to use. [UseUploadSimpleProps](/reference/filoz/synapse-react/interfaces/useuploadsimpleprops/) |

## Returns

`UseMutationResult`\<\{ `addMessageOk`: `true`; `confirmedPieceIds`: `bigint`[]; `confirmedTxHash?`: `` `0x${string}` ``; `dataSetId`: `bigint`; `pieceCount`: `number`; `piecesAdded`: `true`; `txHash`: `` `0x${string}` ``; `txStatus`: `"confirmed"`; \}, [`Error`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Error), [`UseUploadSimpleVariables`](/reference/filoz/synapse-react/interfaces/useuploadsimplevariables/), `unknown`\>

The upload mutation.