Uploading files
Using SendFile
SendFileawait client.sendFile("me",{
file: "video.mp4",
});Using UploadFile
UploadFileconst toUpload = new CustomFile("photo.jpg", fs.statSync("../photo.jpg").size, "../photo.jpg");
const file = await client.uploadFile({
file: toUpload,
workers: 1,
});
await client.invoke(new Api.photos.UploadProfilePhoto({
file: file,
}));Increasing speed
Last updated