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

Merge pull request #80 from RafaelKr/master

URL-decoded filename when sending file from stream
This commit is contained in:
Yago 2016-03-01 11:03:28 +01:00
commit 6ed84b8b1c

View File

@ -7,6 +7,7 @@ var EventEmitter = require('events').EventEmitter;
var fileType = require('file-type');
var Promise = require('bluebird');
var request = require('request');
var qs = require('querystring');
var stream = require('stream');
var util = require('util');
var mime = require('mime');
@ -277,7 +278,7 @@ TelegramBot.prototype._formatSendData = function (type, data) {
formData[type] = {
value: data,
options: {
filename: fileName,
filename: qs.unescape(fileName),
contentType: mime.lookup(fileName)
}
};