Add an alert if the webcam print fails

This commit is contained in:
n07070
2026-05-20 16:34:45 +02:00
parent e926ee9163
commit c5a8019fbe

View File

@@ -255,7 +255,12 @@ function print_picture(data){
// headers:{
// 'Content-Type': 'multipart/form-data'
// }
}).then(function(response) { console.log('Success:', response); } , true)
}).then(function(response) {
console.log('Reponse:', response);
if(response.status != 200 ){
alert("The picture could not be printed be : " + response.statusText)
}
} , true)
.catch(error => console.error('Error:', error), false);
}