05.09.2018, 16:19
Hi,
Im trying to send an image located in the Logic Machine by telegram but it doesn´t work.
Using an url image from internet work perfectly
My code is:
local telegram_url_sendphototo = "https://api.telegram.org/bot<token>/sendPhoto?"
function SendPhotoTo (photo)
local chat_id ='353575234245'
local data_str = 'chat_id='..chat_id..'&photo='..photo..""
local res, code, headers, status = ssl.https.request(telegram_url_sendphototo,data_str)
log (res,code,headers,status)
end
--This code works perfectly
SendPhotoTo("http://www.imagen.com.mx/assets/img/imagen_share.png")
--But this code donesn´t work. I can open in browser but it is not sended by telegram
SendPhotoTo("http://<LogicMachineIP:port>/scada/resources/img/imagen_share.png")
Also I´m trying to send the image that I get from the IPCamera, please see the following link https://forum.logicmachine.net/showthrea...64#pid9364
SendPhotoTo(image)
But it doesnt work
Can anyone help me please?
Thanks
Im trying to send an image located in the Logic Machine by telegram but it doesn´t work.
Using an url image from internet work perfectly
My code is:
local telegram_url_sendphototo = "https://api.telegram.org/bot<token>/sendPhoto?"
function SendPhotoTo (photo)
local chat_id ='353575234245'
local data_str = 'chat_id='..chat_id..'&photo='..photo..""
local res, code, headers, status = ssl.https.request(telegram_url_sendphototo,data_str)
log (res,code,headers,status)
end
--This code works perfectly
SendPhotoTo("http://www.imagen.com.mx/assets/img/imagen_share.png")
--But this code donesn´t work. I can open in browser but it is not sended by telegram
SendPhotoTo("http://<LogicMachineIP:port>/scada/resources/img/imagen_share.png")
Also I´m trying to send the image that I get from the IPCamera, please see the following link https://forum.logicmachine.net/showthrea...64#pid9364
SendPhotoTo(image)
But it doesnt work
Can anyone help me please?
Thanks