First, you must get the `file_id` of the file you want to download. Information about files sent to the bot is contained in [Message](./types/message.md).
For example, download the document that came to the bot.
```python3
file_id = message.document.file_id
```
Then use the [getFile](./methods/get_file.md) method to get `file_path`.
| seek | `#!python3 bool` | Go to start of file when downloading is finished. Used only for destination with `#!python3 typing.BinaryIO` type (Default: `#!python3 True`) |
There are two options where you can download the file: to **disk** or to **binary I/O object**.
### Download file to disk
To download file to disk, you must specify the file name or path where to download the file. In this case, the function will return nothing.
```python3
await bot.download_file(file_path, "text.txt")
```
### Download file to binary I/O object
To download file to binary I/O object, you must specify an object with the `#!python3 typing.BinaryIO` type or use the default (`#!python3 None`) value.
In the first case, the function will return your object:
| 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 `Downloadable` object (object that contains the `file_id` attribute) instead of `file_path`.
!!! note
All `Downloadable` objects are listed in Related pages.