core.medplumclient.createbinary_1
Home > @medplum/core > MedplumClient > createBinary
MedplumClient.createBinary() method
Warning: This API is now obsolete.
Use
createBinary
withCreateBinaryOptions
instead. To be removed in Medplum 4.0.
Signature:
createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<Binary>;
Parameters
Parameter | Type | Description |
---|---|---|
data | 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 | (Optional) Optional fetch options. **NOTE:** only |
Returns:
Promise<Binary>
The result of the create operation.