Upload files to TG using telegram-upload

Original link: https://www.blueskyxn.com/202206/6129.html?utm_source=rss&utm_medium=rss&utm_campaign=%25e4%25bd%25bf%25e7%2594%25a8telegram-upload%25e4%25b8%258a%25e4%25bc% 25a0%25e6%2596%2587%25e4%25bb%25b6%25e5%2588%25b0tg



In this tutorial, in the Linux (CentOS) + PY3.6 environment, use telegram-upload to upload the server file to the specified location of TG

You need to prepare relevant devices, accounts, APIs and network environments. This article uses CentOS commands as examples.



You need to install py3 and pip3 before use, and can be called in the default environment.

 wget https://www.moerats.com/usr/shell/Python3/CentOS_Python3.6.sh && sh CentOS_Python3.6.sh

Then check if the installation was successful

 python3 -V
 pip3 -V


You may also need FFmpeg for video uploads

 yum install ffmpeg -y

If an error is reported, it is required

 sudo yum install epel-release -y sudo rpm -v --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro sudo rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Finally don’t forget to check

 ffmpeg -version

Formal installation

 pip3 install -U telegram-upload



First go to tg official website to get user api https://my.telegram.org/apps

You need the locked id and hash (key, token)


Then run it with the initial command


will ask you to log in QQ%E5%9B%BE%E7%89%8720220620142049.png

The default configuration file is stored in the directory as shown



Since there are not many functions, it is also very simple to use. The basic command is

 telegram-upload /root/files.zip

The default is the command + file path, the default upload to me is the favorites

For command configuration, please refer to the official website documentation https://docs.nekmo.org/telegram-upload/usage.html#telegram-upload

To be more complete, such as

 telegram-upload --to @channel --print-file-id --large-files split /root/.config/config.json

to is the main sending object, forward is forwarding (by default to is sent to me, that is, favorites)

-f, –to Support public links with username and domain name starting with t.me, but do not support private links, TGID, mobile phone number (test failed)

Of course, basically any type of file can be uploaded, including but not limited to pictures, videos, documents and applications


upload speed

File size 500M

30s 9%

60s 18%

90s 27%

150s 46%

210s 65%

240s 74%

300s 93%

322s 100%


Even the TGVIP number is at this speed, which is limited here, that is, about 12M, and it takes about 11 minutes to upload a 1G file.

Program Experience Summary

It is relatively simple to upload files directly from the server to TG’s groups, channels, private chats and favorites

But there are many restrictions. Trial groups/channels are not supported, ID push is not supported, and mobile phone number push is not supported. Only single file upload is possible.

In addition, TG has its own upload speed limit.

Of course, in addition to uploading, the program also has a download function.

References and Related Links






This article is reproduced from: https://www.blueskyxn.com/202206/6129.html?utm_source=rss&utm_medium=rss&utm_campaign=%25e4%25bd%25bf%25e7%2594%25a8telegram-upload%25e4%25b8%258a%25e4%25bc% 25a0%25e6%2596%2587%25e4%25bb%25b6%25e5%2588%25b0tg
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment

Your email address will not be published.