We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e2b5a42 commit 6861429Copy full SHA for 6861429
backend/src/infrastructure/services/download/memoryDownloadCache/index.ts
@@ -25,11 +25,9 @@ const get = (cid: string, options?: DownloadServiceOptions) => {
25
const byteRange = options?.byteRange ?? [0, value.length - 1]
26
27
return bufferToAsyncIterable(
28
- Buffer.from(
29
- value.buffer.slice(
30
- byteRange[0],
31
- byteRange[1] !== undefined ? byteRange[1] + 1 : undefined,
32
- ),
+ value.subarray(
+ byteRange[0],
+ byteRange[1] !== undefined ? byteRange[1] + 1 : undefined,
33
),
34
)
35
}
0 commit comments