upload.File

class pyrogram.raw.base.upload.File

Contains info on file.

Constructors:

This base type has 2 constructors available.

upload.File

File content.

upload.FileCdnRedirect

The file must be downloaded from a CDN DC.

Functions:

This object can be returned by 1 function.

upload.GetFile

Returns content of a whole file or its part.

TL Schema

upload.file#96a18d5
type:storage.FileType
mtime:int
bytes:bytes

= upload.File

Parameter Tree

File
├── typestorage.FileType
│ ├── storage.FileUnknown
│ ├── storage.FilePartial
│ ├── storage.FileJpeg
│ ├── storage.FileGif
│ ├── storage.FilePng
│ ├── storage.FilePdf
│ ├── storage.FileMp3
│ ├── storage.FileMov
│ ├── storage.FileMp4
│ └── storage.FileWebp
├── mtimeint
└── bytesbytes

Example

File(
    type=FileUnknown(),
    mtime=0,
    bytes=b"data",
)