core.medplumclient.createbinary_1 | Medplum
MedplumClient.createBinary() method
Warning: This API is now obsolete.
Use
createBinarywithCreateBinaryOptionsinstead. To be removed in a future version.
Signature:
createBinary(data: BinarySource, filename: string | undefined, contentType: string, onProgress?: (e: ProgressEvent) => void, options?: MedplumRequestOptions): Promise<WithId<Binary>>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| data | 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 | (Optional) Optional fetch options. NOTE: only options.signal is respected when onProgress is also provided. |
Returns:
Promise< WithId
The result of the create operation.