From 037330feec2ae2d678d58a75fc84b07a76995388 Mon Sep 17 00:00:00 2001 From: yago Date: Fri, 17 Jul 2015 00:30:44 +0200 Subject: [PATCH] sendPhoto from URL with parameters --- src/telegram.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telegram.js b/src/telegram.js index 242b2a3..5e7cb05 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -162,7 +162,7 @@ TelegramBot.prototype._formatSendData = function (type, data) { var fileName; var fileId; if (data instanceof stream.Stream) { - fileName = path.basename(data.path); + fileName = URL.parse(path.basename(data.path)).pathname; formData = {}; formData[type] = { value: data,