mast / telegram-bot-api

First Telegram Bot API node.js library
http://mast.github.io/telegram-bot-api/
MIT License
246 stars 64 forks source link

Let sendDocument and sendPhoto take a stream instead of a filename #16

Closed patrick246 closed 4 years ago

patrick246 commented 8 years ago

I'm writing a bot where I download Pictures and Videos and send them over Telegram. To do that with the current API I need to save the HTTP Stream to a file and then let the API read that file. With a small change to those functions I'm able to pass them a stream and they send it happily.

derhuerst commented 8 years ago

:+1: Besides more elegant and efficient code, using streams would make telegram-bot-api more unopinionated because it doesn't force you to work with files.

mast commented 4 years ago

Fixed in 2.0