# @mtcute/file-id

> Support for TDLib and Bot API file ID for mtcute

Latest version **0.32.0** (published 2026-08-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mtcute/file-id
pnpm add @mtcute/file-id
yarn add @mtcute/file-id
bun add @mtcute/file-id
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.32.0 |
| Published | 2026-08-27 |
| First published | 2023-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 3 |
| Unpacked size | 67.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 568 |
| Author | alina sireneva |
| Maintainers | teidesu |

## Links

- npm: https://www.npmjs.com/package/@mtcute/file-id
- Repository: https://github.com/mtcute/mtcute
- Homepage: https://mtcute.dev
- Issues: https://github.com/mtcute/mtcute/issues
- npm.io page: https://npm.io/package/@mtcute/file-id

## Dependencies (3)

- [long](https://npm.io/package/long.md) ^5.3.2
- [@fuman/utils](https://npm.io/package/@fuman/utils.md) 0.0.21
- [@mtcute/tl-runtime](https://npm.io/package/@mtcute/tl-runtime.md) ^0.32.0

## Recent versions

- 0.32.0 (latest) — 2026-08-27
- 0.31.0 — 2026-07-15
- 0.30.3 — 2026-07-03
- 0.29.0 — 2026-03-16
- 0.28.2 — 2026-03-04
- 0.28.1 — 2026-02-22
- 0.27.8 — 2026-01-25
- 0.27.6 — 2026-01-09
- 0.27.0 — 2025-11-15
- 0.24.3 — 2025-06-22
- 0.23.0 — 2025-04-16
- 0.22.0 — 2025-03-08
- 0.19.0 — 2024-12-30
- 0.18.0 — 2024-12-30
- 0.18.0-rc.5 — 2024-12-14
- … 21 more at https://npm.io/package/@mtcute/file-id/versions

## README

# @mtcute/file-id

📖 [API Reference](https://ref.mtcute.dev/modules/_mtcute_file-id.html)

This package is used internally by `@mtcute/core` to parse, serialize
and manipulate TDLib and Bot API compatible File IDs, but can also be used
for any other purposes.

## Acknowledgements
This is basically a port of a portion of TDLib APIs, but greatly
simplified in usage and made to work seamlessly with the rest of the
mtcute APIs.

This is a list of files from TDLib repository, from which most of the code was taken:
 - [td/telegram/files/FileManager.cpp](https://github.com/tdlib/td/blob/master/td/telegram/files/FileManager.cpp)
 - [td/telegram/files/FileLocation.hpp](https://github.com/tdlib/td/blob/master/td/telegram/files/FileLocation.hpp)
 - [td/telegram/PhotoSizeSource.h](https://github.com/tdlib/td/blob/master/td/telegram/PhotoSizeSource.h)
 - [td/telegram/PhotoSizeSource.hpp](https://github.com/tdlib/td/blob/master/td/telegram/PhotoSizeSource.hpp)
 - [td/telegram/Version.h](https://github.com/tdlib/td/blob/master/td/telegram/Version.h)

Additionally, some of the test cases were taken from a similar Python
library, [luckydonald/telegram_file_id](https://github.com/luckydonald/telegram_file_id)

---
_Source: https://npm.io/package/@mtcute/file-id · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
