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
#12
Hi,

I still don't know how to make a snapshoot from my ip camera and save or send it.

I have created a DNS to share the url in case you want to test it and help me. The camera is covered by privacy reasons...

IP : http://dnspruebacamara.myqnapcloud.com:5858/
user: admin
pass: 123456789

I have test it from web explorers (chrome or firefox) and it works perfectly from Them:

http://admin:123456789@dnspruebacamara.m...pshot.jpeg

where ts=... is a random number that i must change by code, for the navigator not to ask me again the security credencials

.... But I can not get it work from the following code:

image_type = 'jpeg'
image_name_attachment = 'snapshot'
source_image_url = 'http://admin:123456789@dnspruebacamara.myqnapcloud.com:5858/cgi-bin/snapshot.cgi?1&ts=4561248/snapshot.jpeg'

where ts=... is a random number that i must change by code, for the navigator not to ask me again the security credencials

--Get remote (from HTTP) image and put image file to HL (will be deleted when end of script)
os.execute('wget -O /www/scada/vis/' .. image_name_attachment .. '.' .. image_type .. ' ' .. source_image_url .. '')

or I have also tried this other code, and it did not work either:

image = socket.http.request(source_image_url)

I know that I am doing something wrong, but I dont know what I am missing.

Can anyone help me please???

Best regards
Reply


Messages In This Thread
RE: email with attachement gives image size 0 - by DGrandes - 16.08.2018, 09:32

Forum Jump: