Related pages

This commit is contained in:
Gabben 2020-05-16 20:40:12 +05:00
parent ec75c56bb6
commit 544e0ec2f2
11 changed files with 27 additions and 1 deletions

View file

@ -76,7 +76,10 @@ value of destination and handle result of this method.
| chunk_size | `#!python3 int` | File chunks size (Default: `64 kb`) | | chunk_size | `#!python3 int` | File chunks size (Default: `64 kb`) |
| seek | `#!python3 bool` | Go to start of file when downloading is finished. Used only for destination with `#!python3 typing.BinaryIO` type (Default: `#!python3 True`) | | seek | `#!python3 bool` | Go to start of file when downloading is finished. Used only for destination with `#!python3 typing.BinaryIO` type (Default: `#!python3 True`) |
It differs from [download_file](#download_file) **only** in that it accepts `file_id` or an object that contains the `file_id` attribute instead of `file_path`. It differs from [download_file](#download_file) **only** in that it accepts `file_id` or an `Downloadable` object (object that contains the `file_id` attribute) instead of `file_path`.
!!! note
All `Downloadable` objects are listed in Related pages.
You can download a file to [disk](#download-file-to-disk) or to a [binary I/O](#download-file-to-binary-io-object) object in the same way. You can download a file to [disk](#download-file-to-disk) or to a [binary I/O](#download-file-to-binary-io-object) object in the same way.
@ -86,3 +89,16 @@ Example:
document = message.document document = message.document
await bot.download(document) await bot.download(document)
``` ```
## Related pages:
- [Animation](types/animation.md)
- [Audio](types/audio.md)
- [Document](types/document.md)
- [File](types/file.md)
- [PassportFile](types/passport_file.md)
- [PhotoSize](types/photo_size.md)
- [Sticker](types/sticker.md)
- [Video](types/video.md)
- [VideoNote](types/video_note.md)
- [Voice](types/voice.md)

View file

@ -31,3 +31,4 @@ This object represents an animation file (GIF or H.264/MPEG-4 AVC video without
- [Official documentation](https://core.telegram.org/bots/api#animation) - [Official documentation](https://core.telegram.org/bots/api#animation)
- [aiogram.types.PhotoSize](../types/photo_size.md) - [aiogram.types.PhotoSize](../types/photo_size.md)
- [How to download file?](../downloading_files.md)

View file

@ -30,3 +30,4 @@ This object represents an audio file to be treated as music by the Telegram clie
- [Official documentation](https://core.telegram.org/bots/api#audio) - [Official documentation](https://core.telegram.org/bots/api#audio)
- [aiogram.types.PhotoSize](../types/photo_size.md) - [aiogram.types.PhotoSize](../types/photo_size.md)
- [How to download file?](../downloading_files.md)

View file

@ -28,3 +28,4 @@ This object represents a general file (as opposed to photos, voice messages and
- [Official documentation](https://core.telegram.org/bots/api#document) - [Official documentation](https://core.telegram.org/bots/api#document)
- [aiogram.types.PhotoSize](../types/photo_size.md) - [aiogram.types.PhotoSize](../types/photo_size.md)
- [How to download file?](../downloading_files.md)

View file

@ -27,3 +27,4 @@ Maximum file size to download is 20 MB
## Related pages: ## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#file) - [Official documentation](https://core.telegram.org/bots/api#file)
- [How to download file?](../downloading_files.md)

View file

@ -25,3 +25,4 @@ This object represents a file uploaded to Telegram Passport. Currently all Teleg
## Related pages: ## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#passportfile) - [Official documentation](https://core.telegram.org/bots/api#passportfile)
- [How to download file?](../downloading_files.md)

View file

@ -26,3 +26,4 @@ This object represents one size of a photo or a file / sticker thumbnail.
## Related pages: ## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#photosize) - [Official documentation](https://core.telegram.org/bots/api#photosize)
- [How to download file?](../downloading_files.md)

View file

@ -33,3 +33,4 @@ This object represents a sticker.
- [Official documentation](https://core.telegram.org/bots/api#sticker) - [Official documentation](https://core.telegram.org/bots/api#sticker)
- [aiogram.types.MaskPosition](../types/mask_position.md) - [aiogram.types.MaskPosition](../types/mask_position.md)
- [aiogram.types.PhotoSize](../types/photo_size.md) - [aiogram.types.PhotoSize](../types/photo_size.md)
- [How to download file?](../downloading_files.md)

View file

@ -30,3 +30,4 @@ This object represents a video file.
- [Official documentation](https://core.telegram.org/bots/api#video) - [Official documentation](https://core.telegram.org/bots/api#video)
- [aiogram.types.PhotoSize](../types/photo_size.md) - [aiogram.types.PhotoSize](../types/photo_size.md)
- [How to download file?](../downloading_files.md)

View file

@ -28,3 +28,4 @@ This object represents a video message (available in Telegram apps as of v.4.0).
- [Official documentation](https://core.telegram.org/bots/api#videonote) - [Official documentation](https://core.telegram.org/bots/api#videonote)
- [aiogram.types.PhotoSize](../types/photo_size.md) - [aiogram.types.PhotoSize](../types/photo_size.md)
- [How to download file?](../downloading_files.md)

View file

@ -26,3 +26,4 @@ This object represents a voice note.
## Related pages: ## Related pages:
- [Official documentation](https://core.telegram.org/bots/api#voice) - [Official documentation](https://core.telegram.org/bots/api#voice)
- [How to download file?](../downloading_files.md)