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
Possible errors
Code
Type
Description
400
FILE_PART_EMPTY
The provided file part is empty
400
FILE_PART_INVALID
The file part number is invalid
Can bots use this methd ?
yes
Related pages
Last updated
Was this helpful?