Fix download stream Deno example

This commit is contained in:
Roj Serbest 2021-10-15 13:12:02 +03:00
parent 51a50427e7
commit 0aa25b0ac4
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ await login();
const id = prompt("ID of the document to be downloaded:")!;
const result = (await client.cdn.download(id, true)) as Blob;
const writer = await Deno.open(id, { create: true });
const writer = await Deno.open(id, { create: true, write: true });
const writeStream = writableStreamFromWriter(writer);
result.stream().pipeTo(writeStream);