## MedplumClient.createBinary() method

> Warning: This API is now obsolete.
>
> Use `createBinary` with `CreateBinaryOptions` instead. To be removed in a future version.

**Signature:**

```typescript
createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<WithId<Binary>>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| data | [BinarySource](/content/docs/sdk/core.binarysource) | The binary data to upload. |
| filename | string \| undefined | Optional filename for the binary. |
| contentType | string | Content type for the binary. |
| onProgress | (e: ProgressEvent) => void | _(Optional)_ Optional callback for progress events. **NOTE:** only `options.signal` is respected when `onProgress` is also provided. |
| options | [MedplumRequestOptions](/content/docs/sdk/core.medplumrequestoptions) | _(Optional)_ Optional fetch options. **NOTE:** only `options.signal` is respected when `onProgress` is also provided. |

**Returns:**

Promise< [WithId](/content/docs/sdk/core.withid) <Binary>>

The result of the create operation.
