• April 25, 2019, 05:33:35 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: Camera image download  (Read 962 times)

wolde

  • Level 1 Member
  • *
  • Posts: 3
Camera image download
« on: January 17, 2019, 12:58:12 AM »

Hello,

i have this Link: http://192.168.0.20/image/jpeg.cgi?profileid=1

now I want to download the image with an html Code, but it didn't work. Do you know a solution?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<script type="text/javascript">



function load()
{
var link = document.createElement('a');
link.href = 'http://192.168.0.20/image/jpeg.cgi?profileid=1';
link.download = 'DownloadImg.jpg';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);

}



</script>
</head>
<body onload="load()">
</body>
</html>
Logged

wolde

  • Level 1 Member
  • *
  • Posts: 3
Re: Camera image download
« Reply #1 on: January 17, 2019, 01:00:17 AM »

Hello,

i have this Link: http://192.168.0.20/image/jpeg.cgi?profileid=1

Camera: DCS-7513

now I want to download the image with an html Code, but it didn't work. Do you know a solution?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<script type="text/javascript">



function load()
{
var link = document.createElement('a');
link.href = 'http://192.168.0.20/image/jpeg.cgi?profileid=1';
link.download = 'DownloadImg.jpg';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);

}



</script>
</head>
<body onload="load()">
</body>
</html>
« Last Edit: January 17, 2019, 08:23:39 AM by FurryNutz »
Logged