Skip to content

Commit

Permalink
fix: forgot wrap to MediaUpload.buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Feb 7, 2024
1 parent 13de2fc commit 2e2da4c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/files/media-upload.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ Method for uploading Media File by Buffer or ArrayBuffer.

```ts
const res = await fetch("https://...");
ctx.sendDocument(await res.arrayBuffer(), "from-buffer.json");

ctx.sendDocument(
MediaUpload.buffer(await res.arrayBuffer(), "from-buffer.json")
);
```

By default filename is `file.buffer`.
Expand Down

0 comments on commit 2e2da4c

Please sign in to comment.