diff --git a/src/app/components/forms/photo/Photo.babel.js b/src/app/components/forms/photo/Photo.babel.js index 33aa53d..1468475 100644 --- a/src/app/components/forms/photo/Photo.babel.js +++ b/src/app/components/forms/photo/Photo.babel.js @@ -53,6 +53,22 @@ export default class Photo extends FormGroup { 'alert-info': this.state.dragging }]); + const cameraCapture = function cameraCapture() { + if (/iP(hone|od|ad)/.test(navigator.platform)) { + // supports iOS 2.0 and later: + const v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); + const vArray = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; + + if (vArray[0] < 10) { + return true; + } else if (vArray[0] === 10 && vArray[1] < 3) { + return true; + } + + return false; + } + }; + const fileUploader = (
{!this.isMobileDevice && 'draggable' in document.createElement('span') && typeof(window.FileReader) !== 'undefined' ? ( @@ -70,7 +86,7 @@ export default class Photo extends FormGroup { ) : ( )} { this.state.loadingPhoto ? (