downloadChunk
Download a chunk of a file. CACHE [F]
Parameters
fileId: string
The identifier of a file.
chunkSize?: number
Size of each download chunk in bytes.
offset?: number
Download offset in bytes.
signal?: AbortSignal
Download abort signal.
Result
The downloaded chunk.
Syntax
// Required parameters only.
await client.downloadChunk(fileId);
// Required parameters + optional parameters.
// Any of the optional parameters can be omitted.
await client.downloadChunk(fileId, { chunkSize, offset, signal });
Examples
const chunk = await client.download(fileId, { chunkSize: 256 * 1024 });