• Stars
    star
    689
  • Rank 65,628 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 6 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Upload and download files from Telegram up to 4 GiB using your account

https://raw.githubusercontent.com/Nekmo/telegram-upload/master/logo.png


Latest Tests CI build status Latest PyPI version Python versions Code Climate Test coverage Github stars

telegram-upload

Telegram-upload uses your personal Telegram account to upload and download files up to 4 GiB (2 GiB for free users). Turn Telegram into your personal cloud!

To install 🔧 telegram-upload, run this command in your terminal:

$ sudo pip3 install -U telegram-upload

This is the preferred method to install telegram-upload, as it will always install the most recent stable release. 🐍 Python 3.7-3.11 are tested and supported. There are other installation ways available like Docker. More info in the 📕 documentation

https://raw.githubusercontent.com/Nekmo/telegram-upload/master/telegram-upload-demo.gif

Usage

To use this program you need an Telegram account and your App api_id & api_hash (get it in my.telegram.org). The first time you use telegram-upload it requests your 📱 telephone, api_id and api_hash. Bot tokens can not be used with this program (bot uploads are limited to 50MB).

To send ⬆️ files (by default it is uploaded to saved messages):

$ telegram-upload file1.mp4 file2.mkv

You can download ⤵️ the files again from your saved messages (by default) or from a channel. All files will be downloaded until the last text message.

$ telegram-download

Read the documentation for more info about the options availables.

Interactive mode

The interactive option (--interactive) allows you to choose the dialog and the files to download or upload with a terminal 🪄 wizard. It even supports mouse!

$ telegram-upload --interactive    # Interactive upload
$ telegram-download --interactive  # Interactive download

More info in the documentation

Set group or chat

By default when using telegram-upload without specifying the recipient or sender, telegram-upload will use your personal chat. However you can define the 👨 destination. For file upload the argument is --to <entity>. For example:

$ telegram-upload --to telegram.me/joinchat/AAAAAEkk2WdoDrB4-Q8-gg video.mkv

You can download files from a specific chat using the --from <entity> parameter. For example:

$ telegram-download --from username

You can see all the possible values for the entity in the documentation.

Split & join files

If you try to upload a file that exceeds the maximum supported by Telegram by default, an error will occur. But you can enable split mode to upload multiple files:

$ telegram-upload --large-files split large-video.mkv

Files split using split can be rejoined on download using:

$ telegram-download --split-files join

Find more help in the telegram-upload documentation.

Delete on success

The --delete-on-success option allows you to delete the Telegram message after downloading the file. This is useful to send files to download to your saved messages and avoid downloading them again. You can use this option to download files on your computer away from home.

Configuration

Credentials are saved in ~/.config/telegram-upload.json and ~/.config/telegram-upload.session. You must make sure that these files are secured. You can copy these 📁 files to authenticate telegram-upload on more machines, but it is advisable to create a session file for each machine.

More options

Telegram-upload has more options available, like customizing the files thumbnail, set a caption message (including variables) or configuring a proxy. Read the documentation for more info.

💡 Features

  • Upload and download multiples files (up to 4 GiB per file for premium users).
  • Interactive mode.
  • Add video thumbs.
  • Split and join large files.
  • Delete local or remote file on success.
  • Use variables in the caption message.
  • ... And more.

🐋 Docker

Run telegram-upload without installing it on your system using Docker. Instead of telegram-upload and telegram-download you should use upload and download. Usage:

$ docker run -v <files_dir>:/files/
             -v <config_dir>:/config
             -it nekmo/telegram-upload:master
             <command> <args>
  • <files_dir>: upload or download directory.
  • <config_dir>: Directory that will be created to store the telegram-upload configuration. It is created automatically.
  • <command>: upload and download.
  • <args>: telegram-upload and telegram-download arguments.

For example:

$ docker run -v /media/data/:/files/
             -v $PWD/config:/config
             -it nekmo/telegram-upload:master
             upload file_to_upload.txt

❤️ Thanks

This project developed by Nekmo & collaborators would not be possible without Telethon, the library used as a Telegram client.

Telegram-upload is licensed under the MIT license.

More Repositories

1

dirhunt

Find web directories without bruteforce
Python
1,473
star
2

amazon-dash

Hack your Amazon Dash to run what you want.
Python
795
star
3

gkeep

Google Keep Command Line Interface (CLI)
Python
166
star
4

django-code-generator

Generate code from your Django models for faster development
Python
36
star
5

then

The Actions library for Python developers
Python
29
star
6

simple-monitor-alert

A simple monitor with alerts for Unix/Linux under the KISS philosophy.
Python
29
star
7

sphinx-business-theme

Sphinx theme to generate PDF files using Weasyprint
SCSS
28
star
8

proxy-db

Manage free and private proxies on local db for Python Projects
Python
25
star
9

ansible-keepass

Use become (sudo) in Ansible without giving any password and safely
Python
25
star
10

python-akismet

Akismet support for Python 2/3
Python
15
star
11

angular-django

Django Rest Framework API for Angular with self-building classes, forms, and listings
TypeScript
13
star
12

yakuake-sessions

Python
11
star
13

nekumo-cloud

Nekumo File Manager
Python
11
star
14

djangocms-comments

DjangoCMS Comments Module
Python
11
star
15

cookiecutter-django-backend

A cookiecutter for enterprise projects with support for Celery, Django Rest Framework and deployment with Ansible and Docker
Python
10
star
16

anime-crc

Validate and create CRC checksums for files (ex. anime video [ABCD01234].mkv)
Python
9
star
17

cinebot

Bot Telegram para consultar la cartelera unificada de tus cines
Python
9
star
18

pip-rating

Check the health of your project's requirements and get a score for each dependency.
Python
8
star
19

django-rest-framework-security

Python
7
star
20

pentest-studio

Project management for auditors. Create command templates and execute them with one click
JavaScript
7
star
21

stream-anywhere

Play a video on your pc and continue on your smartphone
Python
6
star
22

angular2-django

angular2-django is Django Rest Framework API for Angular 5+
TypeScript
6
star
23

presentacion-djangocms

Presentación básica de DjangoCMS, orientado a usuarios no familiarizados con Python o Django
JavaScript
5
star
24

random-episode

Play a random chapter of your favorite series, like The Simpsons, Futurama, Friends...
Python
5
star
25

geoip2-tools

Automatic updates and administration of MaxMind GeoIP2 databases.
Python
5
star
26

micropython

Guía, información y recursos Micropython
Python
4
star
27

python311-presentacion

Presentación "¿Qué hay de nuevo en Python 3.11?"
SCSS
4
star
28

smart-display

TypeScript
3
star
29

python-packages-management

Presentación de Pip y virtualenvs en Python
CSS
3
star
30

djangocms-ejemplo

Python
3
star
31

django-rest-framework-presentacion

Presentación "Construyendo APIs con Django Rest Framework".
Python
3
star
32

novedades-python311

HTML
3
star
33

dirhunt-presentacion

Presentación Dirhunt para Hack&Beers
CSS
2
star
34

djangocms-presentation

JavaScript
2
star
35

django-angular2-presentation

CSS
2
star
36

anime-news-network

Python
2
star
37

nekbot

Python
2
star
38

telegram-bot

Python
2
star
39

github-contributions

Python
2
star
40

best-browsable-api

Improves the browsable api of Django Rest Framework
HTML
2
star
41

nginx-dynamic-ips

Python
2
star
42

dotfiles

Python
2
star
43

django-angular2-example

Ejemplo de Angular 6 junto Django Rest Framework
TypeScript
2
star
44

pypi-admin

Manage your Pypi warehouse account from console or using a awesome Python API
Python
2
star
45

AdventOfCode

Python
1
star
46

pulseaudio-screen

Python
1
star
47

django-angular2

Python
1
star
48

python-thumbs

Python
1
star
49

djangorestframework-sudo

Temporary confirmation for dangerous actions such as changing the password
Python
1
star
50

os3

Python
1
star
51

file-cache

Python
1
star
52

selfhosted-docs

Python
1
star
53

Nekmo

1
star
54

mitmproxy-presentacion

Presentación mitmproxy para OpenSouthCode 2023
SCSS
1
star
55

pynabaztag-sounds-es

Archivos de audio en español para PyNabaztag
1
star
56

cookiecutter-python-package

Python
1
star