pytg
pytg copied to clipboard
How to save a file which is sent to me?
Hi, Thanks for great API.Can you tell me how can I save a file which is sent to me on my computer using pytg. I don't know If I should use "load_photo" ? I Couldnt find proper way to use load_photo. Please advise me.
Thx
At the moment, pytg does not handle downloading photo & document. It'd be a nice feature to add. To handle this properly, we will need another method, say called "load_photo" in Telegram class (in init.py) which will execute that load_photo command and save it to filesystem (typically it'll be in $HOME/.telegram/downloads). I'll be glad to accept patch to include this feature.
On Fri, Mar 6, 2015 at 10:12 AM poustchi [email protected] wrote:
Hi, Thanks for great API.Can you tell me how can I save a file which is sent to me on my computer using pytg. I don't know If I should use "load_photo" ? I Couldnt find proper way to use load_photo. Please advise me.
Thx
— Reply to this email directly or view it on GitHub https://github.com/efaisal/pytg/issues/12.
you can now use
sender.load_photo(message_id)
It should return a path. More infos about the huge update today in the readme file.