From 39c0ce66b925489a69fe6196b293d994e00f835a Mon Sep 17 00:00:00 2001 From: Rafael Kr Date: Tue, 1 Mar 2016 09:26:10 +0100 Subject: [PATCH] URL-decoded filename when sending file from stream This sends the file as "My File.ext" instead of "My%20File.ext". --- src/telegram.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/telegram.js b/src/telegram.js index 8f13bed..2f7f1b2 100644 --- a/src/telegram.js +++ b/src/telegram.js @@ -277,7 +277,7 @@ TelegramBot.prototype._formatSendData = function (type, data) { formData[type] = { value: data, options: { - filename: fileName, + filename: decodeURIComponent(fileName), contentType: mime.lookup(fileName) } };