Skip to content

Commit d5c119e

Browse files
committed
feat!: change return type for the container download from blob to ReadableStream
BREAKING CHANGE: buffer property for ContainerDownload is now ReadableStream instead of buffer. response.blob() reads the whole response into ram preventing efficient use of memory to stream the response.
1 parent 0634399 commit d5c119e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type FileMakerResponse<T> = {
2323

2424
type ContainerDownload = {
2525
contentType ?: string | null;
26-
buffer : Blob;
26+
buffer : ReadableStream<unknown> | null;
2727
};
2828

2929
export default class Client {
@@ -107,7 +107,7 @@ export default class Client {
107107

108108
return {
109109
contentType: response.headers.get('Content-Type'),
110-
buffer: await response.blob(),
110+
buffer: response.body,
111111
};
112112
}
113113

0 commit comments

Comments
 (0)