2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-29 13:27:44 +00:00

sendPhoto from URL with parameters

This commit is contained in:
yago 2015-07-17 00:30:44 +02:00
parent 00567a2f74
commit 037330feec

View File

@ -162,7 +162,7 @@ TelegramBot.prototype._formatSendData = function (type, data) {
var fileName; var fileName;
var fileId; var fileId;
if (data instanceof stream.Stream) { if (data instanceof stream.Stream) {
fileName = path.basename(data.path); fileName = URL.parse(path.basename(data.path)).pathname;
formData = {}; formData = {};
formData[type] = { formData[type] = {
value: data, value: data,