Error: value required in setHeader("Content-Length", value).
at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at FormData. (/home/fenix/chatBot/node_modules/form-data/lib/form_data.js:321:13)
at /home/fenix/chatBot/node_modules/form-data/lib/form_data.js:265:7
at /home/fenix/chatBot/node_modules/async/lib/async.js:251:17
at done (/home/fenix/chatBot/node_modules/async/lib/async.js:126:15)
at /home/fenix/chatBot/node_modules/async/lib/async.js:32:16
at /home/fenix/chatBot/node_modules/async/lib/async.js:248:21
at /home/fenix/chatBot/node_modules/async/lib/async.js:572:34
at /home/fenix/chatBot/node_modules/form-data/lib/form_data.js:105:13
at FSReqWrap.oncomplete (fs.js:82:15)
So i think that is not correct and i can't find an example, what can i do?
Thanks!
How can i send an image by set file_id?
I tried:
bot.send(new File().file('FILEIDXXXXX','image').to(chat));
But the response is:
Error: `value` required in setHeader("Content-Length", value).
at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at FormData.<anonymous> (/home/fenix/chatBot/node_modules/form-data/lib/form_data.js:321:13)
at /home/fenix/chatBot/node_modules/form-data/lib/form_data.js:265:7
at /home/fenix/chatBot/node_modules/async/lib/async.js:251:17
at done (/home/fenix/chatBot/node_modules/async/lib/async.js:126:15)
at /home/fenix/chatBot/node_modules/async/lib/async.js:32:16
at /home/fenix/chatBot/node_modules/async/lib/async.js:248:21
at /home/fenix/chatBot/node_modules/async/lib/async.js:572:34
at /home/fenix/chatBot/node_modules/form-data/lib/form_data.js:105:13
at FSReqWrap.oncomplete (fs.js:82:15)
So i think that is not correct and i can't find an example, what can i do?
Thanks!
It appears that File.file() method's first param must be a relative or absolute path to a file that sits on the same machine that runs your telegram bot. This method does not support sending files using already uploaded files that are assigned unique file ID string provided by Telegram API.
PR would be great
It appears that `File.file()` method's first param must be a relative or absolute path to a file that sits on the same machine that runs your telegram bot. This method does not support sending files using already uploaded files that are assigned unique file ID string provided by Telegram API.
PR would be great
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
How can i send an image by set file_id?
I tried:
bot.send(new File().file('FILEIDXXXXX','image').to(chat));
But the response is:
Error:
valuerequired in setHeader("Content-Length", value).at ClientRequest.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
at FormData. (/home/fenix/chatBot/node_modules/form-data/lib/form_data.js:321:13)
at /home/fenix/chatBot/node_modules/form-data/lib/form_data.js:265:7
at /home/fenix/chatBot/node_modules/async/lib/async.js:251:17
at done (/home/fenix/chatBot/node_modules/async/lib/async.js:126:15)
at /home/fenix/chatBot/node_modules/async/lib/async.js:32:16
at /home/fenix/chatBot/node_modules/async/lib/async.js:248:21
at /home/fenix/chatBot/node_modules/async/lib/async.js:572:34
at /home/fenix/chatBot/node_modules/form-data/lib/form_data.js:105:13
at FSReqWrap.oncomplete (fs.js:82:15)
So i think that is not correct and i can't find an example, what can i do?
Thanks!
It appears that
File.file()method's first param must be a relative or absolute path to a file that sits on the same machine that runs your telegram bot. This method does not support sending files using already uploaded files that are assigned unique file ID string provided by Telegram API.PR would be great
for now, you can use the api methods directly:
I’ll try thanks a lot