Skip to content

[Feature] Batch download for selected images and videos via Telegram selection mode #159

Description

@Ericcwang23

Related


Background

This feature adds support for batch downloading images and videos from selected messages in Telegram WebApp.


Proposal

Introduce a batch download workflow based on Telegram's native message selection mode.

The system uses user-selected messages as the source of truth for media collection.


User Flow

  1. User enters Telegram's native selection mode (multi-select UI)
  2. User selects one or more messages containing media
  3. A contextual action button appears in the chat header:
    • 📥 Batch Download (N media / M messages)
  4. User triggers the download action
  5. Selected messages are processed sequentially
  6. Button is hidden when selection mode is exited

Scope

  • Platform: Telegram WebApp (/a/)
  • Supported media types:
    • Images
    • Videos
  • Album support: grouped messages
  • Download strategy: sequential processing with throttling (e.g. 300–500ms delay)
  • Fallback: blob URL based download (no dependency on native file picker APIs)

Implementation Notes

  • Selected message IDs are used as the input source
  • Media items are extracted from selection context
  • A download queue is processed sequentially to prevent request bursts
  • UI state is bound to selection mode lifecycle events

Reference Implementation

A working prototype has been implemented locally for validation purposes:

https://github.com/Ericcwang23/Telegram-Media-Downloader

This is provided as a reference implementation of the proposed workflow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions