DmitrMakeev commited on
Commit
21d8c53
1 Parent(s): b9757a6

Update se_mes_im2.html

Browse files
Files changed (1) hide show
  1. se_mes_im2.html +4 -5
se_mes_im2.html CHANGED
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
@@ -30,15 +30,14 @@
30
  })
31
  .then(data => {
32
  document.getElementById('message').innerText = data;
 
 
 
33
  })
34
  .catch(error => {
35
  document.getElementById('message').innerText = 'Error: ' + error.message;
36
  });
37
  });
38
- setInterval(function(){
39
- var image = document.getElementById("cameraImage");
40
- image.src = "/image?" + new Date().getTime();
41
- }, 10000); // обновление каждые 10 секунд
42
  </script>
43
  </body>
44
  </html>
 
1
+ <!DOCTYPE html>
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
 
30
  })
31
  .then(data => {
32
  document.getElementById('message').innerText = data;
33
+ var image = document.getElementById("cameraImage");
34
+ var newFilename = data.split('saved to ')[1].split('\\').pop().split('/').pop();
35
+ image.src = "/image/" + newFilename + "?" + new Date().getTime();
36
  })
37
  .catch(error => {
38
  document.getElementById('message').innerText = 'Error: ' + error.message;
39
  });
40
  });
 
 
 
 
41
  </script>
42
  </body>
43
  </html>