diff --git a/src/views/CameraCapture.vue b/src/views/CameraCapture.vue index 2da1201..8bcfa65 100644 --- a/src/views/CameraCapture.vue +++ b/src/views/CameraCapture.vue @@ -180,7 +180,9 @@ export default { const constraints = (window.constraints = { audio: false, - video: true + video: { + facingMode: 'environment' + } }) navigator.mediaDevices.getUserMedia(constraints).then((stream) => { @@ -231,7 +233,13 @@ export default { const file = dataURLtoFile(this.photo.src, 'upload.png') - addNewPhoto(file, null, this.selected_group) + addNewPhoto(file, null, this.selected_group).then(() => { + this.message.success('Done!') + this.isPhotoTaken = false + this.showPhotoTakenModal = false + }).catch((error) => { + this.message.error('There was an error uploading the photo: ' + error) + }) }, }, }