Skip to main content

Upload (and download) files to Telegram up to 4 GiB using your account.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

telegram-upload-0.7.1.tar.gz (281.8 kB view details)

Uploaded Source

Built Distribution

telegram_upload-0.7.1-py2.py3-none-any.whl (48.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file telegram-upload-0.7.1.tar.gz.

File metadata

  • Download URL: telegram-upload-0.7.1.tar.gz
  • Upload date:
  • Size: 281.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for telegram-upload-0.7.1.tar.gz
Algorithm Hash digest
SHA256 5b4134ec11a01cc16e818729916cfbf27bc62412ac358c599e71858fdefc5174
MD5 a10e0433319dfb83c67fd0ef3c911841
BLAKE2b-256 3e98e5a54625d33cee151de7196b2f9c22bf082accb3add8e3d9a49a5f71042d

See more details on using hashes here.

File details

Details for the file telegram_upload-0.7.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for telegram_upload-0.7.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a6561b90f7526fe73b6c65b25b91641c41c9a1ed144dba592331b2f85f131a24
MD5 985769887f0dbbe2515b5dbc6cea27e5
BLAKE2b-256 b28f64d641e14758500e01b4f0abc6671b119a6e7043f29802b60ba383b84ddd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page