Skip to content

fetch download.Function.saveChunks

github-actions[bot] edited this page Jun 8, 2026 · 2 revisions

@zenstone/ts-utils / fetch-download / saveChunks

Function: saveChunks()

saveChunks(chunks, filename, mimeType?): void

Defined in: src/fetch-download/saveChunks.ts:17

将 chunks 保存到本机,该方法只可在浏览器中执行

const task = fetchDownload('url');
await task.read();

saveChunks(task.chunks, 'test.js');

Parameters

chunks

Uint8Array

filename

string | (() => string)

mimeType?

string | null

Returns

void

Clone this wiki locally