Hello,
I've tried to use this script but I can´t get it to work.
******************************************************************************
function handleAtt(att)
if att == "snapshoot" then
local snapshoot = 'http://IPCAMERA/cgi-bin/snapshot.cgi?'
local attachment = ltn12.source.chain( ltn12.source.string(snapshot), ltn12.filter.chain(mime.encode('base64'), mime.wrap()) )
return
{
{
headers = {
['Content-type'] = 'image/jpeg; name="image.jpg"',
['Content-disposition'] = 'attachment; filename="image.jpg"',
['Content-transfer-encoding'] = 'BASE64',
},
body = attachment
}
}
end
end
The mail function send me a emai with jpg attachment but i can´t see anything.
When I use the link 'http://IPCAMERA/cgi-bin/snapshot.cgi?' i have to log in. How can I automatize with code?
Thanks
I've tried to use this script but I can´t get it to work.
******************************************************************************
function handleAtt(att)
if att == "snapshoot" then
local snapshoot = 'http://IPCAMERA/cgi-bin/snapshot.cgi?'
local attachment = ltn12.source.chain( ltn12.source.string(snapshot), ltn12.filter.chain(mime.encode('base64'), mime.wrap()) )
return
{
{
headers = {
['Content-type'] = 'image/jpeg; name="image.jpg"',
['Content-disposition'] = 'attachment; filename="image.jpg"',
['Content-transfer-encoding'] = 'BASE64',
},
body = attachment
}
}
end
end
The mail function send me a emai with jpg attachment but i can´t see anything.
When I use the link 'http://IPCAMERA/cgi-bin/snapshot.cgi?' i have to log in. How can I automatize with code?
Thanks