upload.GetFile

class pyrogram.raw.functions.upload.GetFile

Returns content of a whole file or its part.

Details:
  • Layer: 223

  • ID: BE5335BE

Parameters:
  • location (InputFileLocation) – File location

  • offset (int 64-bit) – Number of bytes to be skipped

  • limit (int 32-bit) – Number of bytes to be returned

  • precise (bool, optional) – Disable some checks on limit and offset values, useful for example to stream videos by keyframes

  • cdn_supported (bool, optional) – Whether the current client supports CDN downloads

Returns:

upload.File

TL Schema

upload.getFile#be5335be
flags:#
precise:flags.0?true
cdn_supported:flags.1?true
location:InputFileLocation
offset:long
limit:int

= upload.File

Parameter Tree

GetFile
├── precisetrue (optional)
├── cdn_supportedtrue (optional)
├── locationInputFileLocation
│ ├── InputFileLocation
│ │ ├── volume_idlong
│ │ ├── local_idint
│ │ ├── secretlong
│ │ └── file_referencebytes
│ │ ├── idlong
│ │ └── access_hashlong
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── file_referencebytes
│ │ └── thumb_sizestring
│ │ ├── idlong
│ │ └── access_hashlong
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── file_referencebytes
│ │ └── thumb_sizestring
│ │ ├── idlong
│ │ ├── access_hashlong
│ │ ├── file_referencebytes
│ │ ├── volume_idlong
│ │ ├── local_idint
│ │ └── secretlong
│ │ ├── bigtrue (optional)
│ │ ├── peerInputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ └── photo_idlong
│ ├── InputStickerSetThumb
│ │ ├── stickersetInputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ │ ├── idlong
│ │ │ │ └── access_hashlong
│ │ │ ├── InputStickerSetShortName
│ │ │ │ └── short_namestring
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ │ └── emoticonstring
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── thumb_versionint
│ └── InputGroupCallStream
│ ├── callInputGroupCall
│ │ ├── InputGroupCall
│ │ │ ├── idlong
│ │ │ └── access_hashlong
│ │ ├── InputGroupCallSlug
│ │ │ └── slugstring
│ │ └── InputGroupCallInviteMessage
│ │ └── msg_idint
│ ├── time_mslong
│ ├── scaleint
│ ├── video_channelint (optional)
│ └── video_qualityint (optional)
├── offsetlong
└── limitint

Example

await app.invoke(
    GetFile(
        precise=None,
        cdn_supported=None,
        location=InputFileLocation(
            volume_id=0,
            local_id=0,
            secret=0,
            file_reference=b"data"
        ),
        offset=0,
        limit=0,
    )
)