From 2e2da4c277b3938780435cbf6fdf037143dd0feb Mon Sep 17 00:00:00 2001 From: Kravets <57632712+kravetsone@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:47:24 +0300 Subject: [PATCH] fix: forgot wrap to MediaUpload.buffer --- docs/files/media-upload.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/files/media-upload.md b/docs/files/media-upload.md index 117ee99..2cf1ee7 100644 --- a/docs/files/media-upload.md +++ b/docs/files/media-upload.md @@ -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`.