Add an alert if the webcam print fails
This commit is contained in:
@@ -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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user