How to upload files? (update to Telethon > 1.0)
See original GitHub issue- telegram-upload version: 0.1.5
- Python version: 3.5
- Operating System: Elementary OS
Description
Describe what you were trying to get done. I was trying to upload file using telegram-upload Tell us what happened, what went wrong, and what you expected to happen. File wasn’t uploaded and I got a warning.
What I Did
I ran the command
telegram-upload /home/cyberboy/python/TelegramBot/test100k.db
Paste the command(s) you ran and the output.
/usr/local/lib/python3.5/dist-packages/telegram_upload/client.py:31: RuntimeWarning: coroutine ‘UploadMethods.send_file’ was never awaited progress_callback=progress, attributes=get_file_attributes(file))
If there was a crash, please include the traceback here.
I’m not able to understand how to make it upload a certain file. I also had a query whether it can send the uploaded file to a member having a certain chat_id ?
A documentation of how to use this will be very useful.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (6 by maintainers)
Top Results From Across the Web
FastTelethonhelper - PyPI
Make Telethon files upload/download faster. ... FastTelethonhelper 1.0.7. pip install FastTelethonhelper. Copy PIP instructions. Latest version.
Read more >Telethon Documentation - Read the Docs
Telethon is a Python library, which means you need to download and install Python from https://www.python.org/.
Read more >Working with Updates — Telethon 1.7.7 documentation
Coming from Telethon before it reached its version 1.0? ... from telethon import TelegramClient, events client = TelegramClient('name', api_id, ...
Read more >Changelog (Version History) — Telethon 1.26.0 documentation
This page lists all the available versions of the library, in chronological order. You should read this when upgrading the library to know...
Read more >Downloads an uploaded file from updates telethon
Do i need to create a new function or it can be inside that my_event_handler function? You can just add a few rows...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
There have been changes in the Telethon dependency. https://telethon.readthedocs.io/en/latest/extra/basic/asyncio-magic.html
It is necessary to adapt the code. Meanwhile, you can use an earlier version of Telethon.
Thanks for your help.
By default telegram-upload sends the files to your own user (me). You can specify the user (using @user or id) with the
--to
parameter.Help: