This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

email with attachement gives image size 0
#5
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
Reply


Messages In This Thread
RE: email with attachement gives image size 0 - by DGrandes - 11.07.2018, 10:51

Forum Jump: