upload.getWebfile #

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.

Layer 223

upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
---functions---
upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile;

Parameters #

NameTypeDescription
locationInputWebFileLocationThe file to download
offsetintNumber of bytes to be skipped
limitintNumber of bytes to be returned

Result #

upload.WebFile

Only users can use this method #

Possible errors #

CodeTypeDescription
400DOCUMENT_INVALIDThe specified document is invalid.
400LOCATION_INVALIDThe provided location is invalid.

Uploading and Downloading Files #

How to transfer large data batches correctly.

Client configuration #

The MTProto API has multiple configuration parameters that can be fetched with the appropriate methods.