2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 12:57:38 +00:00

URL-decoded filename when sending file from stream

This sends the file as "My File.ext" instead of "My%20File.ext".
This commit is contained in:
Rafael Kr 2016-03-01 09:26:10 +01:00
parent 8a09f77327
commit 39c0ce66b9

View File

@ -277,7 +277,7 @@ TelegramBot.prototype._formatSendData = function (type, data) {
formData[type] = {
value: data,
options: {
filename: fileName,
filename: decodeURIComponent(fileName),
contentType: mime.lookup(fileName)
}
};