upload.saveFilePart

Saves a part of file for futher sending to one of the methods.

Example

const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.upload.saveFilePart({
        fileId: 3008416,
        filePart: 1765024,
        bytes: Buffer.from('some bytes here'),
        }));
    console.log(result); // prints the result
})();

TL schema

boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool;

Parameters

Result

Bool

Possible errors

Can bots use this methd ?

yes

Last updated