upload.GetFile

class pyrogram.raw.functions.upload.GetFile

Returns content of a whole file or its part.

Details:
  • Layer: 227

  • 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
├── precise → true (optional)
├── cdn_supported → true (optional)
├── location → InputFileLocation
│ ├── InputFileLocation
│ │ ├── volume_id → long
│ │ ├── local_id → int
│ │ ├── secret → long
│ │ └── file_reference → bytes
│ │ ├── id → long
│ │ └── access_hash → long
│ │ ├── id → long
│ │ ├── access_hash → long
│ │ ├── file_reference → bytes
│ │ └── thumb_size → string
│ │ ├── id → long
│ │ └── access_hash → long
│ │ ├── id → long
│ │ ├── access_hash → long
│ │ ├── file_reference → bytes
│ │ └── thumb_size → string
│ │ ├── id → long
│ │ ├── access_hash → long
│ │ ├── file_reference → bytes
│ │ ├── volume_id → long
│ │ ├── local_id → int
│ │ └── secret → long
│ │ ├── big → true (optional)
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ └── photo_id → long
│ ├── InputStickerSetThumb
│ │ ├── stickerset → InputStickerSet
│ │ │ ├── InputStickerSetEmpty
│ │ │ ├── InputStickerSetID
│ │ │ │ ├── id → long
│ │ │ │ └── access_hash → long
│ │ │ ├── InputStickerSetShortName
│ │ │ │ └── short_name → string
│ │ │ ├── InputStickerSetAnimatedEmoji
│ │ │ ├── InputStickerSetDice
│ │ │ │ └── emoticon → string
│ │ │ ├── InputStickerSetPremiumGifts
│ │ │ └── InputStickerSetTonGifts
│ │ └── thumb_version → int
│ └── InputGroupCallStream
│ ├── call → InputGroupCall
│ │ ├── InputGroupCall
│ │ │ ├── id → long
│ │ │ └── access_hash → long
│ │ ├── InputGroupCallSlug
│ │ │ └── slug → string
│ │ └── InputGroupCallInviteMessage
│ │ └── msg_id → int
│ ├── time_ms → long
│ ├── scale → int
│ ├── video_channel → int (optional)
│ └── video_quality → int (optional)
├── offset → long
└── limit → int

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,
    )
)