Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Feb 24, 2025
1 parent 23d7875 commit b5f1d39
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/3/files.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ To download a file, you have to know its file identifier: `FileId`.
You find this property in the [`Animation`], [`Audio`], [`Document`], [`Video`], [`VideoNote`], [`Voice`], [`Sticker`] objects from a message.

For a `Photo`, you get an array `PhotoSize[]` with `FileId` for each resolution variants.
The last entry contains the best quality: `message.Photo[^1].FileId`

The last entry contains the best quality: `message.Photo[^1].FileId`
For `ChatPhoto`, there is a `BigFileId` for best quality, and `SmallFileId` for low resolution.

## Methods for downloading a file
Expand All @@ -22,7 +21,7 @@ await using var stream = File.Create("../downloaded.mp4");
await bot.DownloadFile(tgFile, stream);
```

For your convenience the library provides you a helper function that does both steps: `GetInfoAndDownloadFile`
For your convenience, the library provides a helper function that does both steps: `GetInfoAndDownloadFile`

```csharp
await using var ms = new MemoryStream();
Expand Down

0 comments on commit b5f1d39

Please sign in to comment.