Link Search Menu Expand Document

Method: upload.getWebFile

Back to methods index

Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info.

Note: the query must be sent to the DC specified in the webfile_dc_id MTProto configuration field.


locationInputWebFileLocationThe file to downloadYes
offsetintNumber of bytes to be skippedOptional
limitintNumber of bytes to be returnedOptional

Return type: upload.WebFile

Can bots use this method: NO

MadelineProto Example (now async for huge speed and parallelism!):

if (!file_exists('madeline.php')) {
    copy('', 'madeline.php');
include 'madeline.php';

$MadelineProto = new \danog\MadelineProto\API('session.madeline');

$upload_WebFile = $MadelineProto->upload->getWebFile(location: $InputWebFileLocation, offset: $int, limit: $int, );