Update Deno download example

This commit is contained in:
Roj Serbest 2021-10-15 13:07:47 +03:00
parent aa96a1b259
commit 7b6569f1b6
1 changed files with 1 additions and 2 deletions

View File

@ -3,8 +3,7 @@ import { client, login } from "./mod.ts";
await login();
const id = prompt("ID of the document to be downloaded:")!;
const data = await client.cdn.download(id);
const data = (await client.cdn.download(id)) as ArrayBuffer;
await Deno.writeFile(id, new Uint8Array(data));
console.log("Downloaded successfully.");