Add an alert if the webcam print fails

This commit is contained in:
n07070
2026-05-20 16:34:45 +02:00
parent 24260834ff
commit 0f848ba790

View File

@@ -255,7 +255,12 @@ function print_picture(data){
// headers:{ // headers:{
// 'Content-Type': 'multipart/form-data' // '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); .catch(error => console.error('Error:', error), false);
} }