Created
May 13, 2017 13:58
-
-
Save pedrobrasileiro/893721901e4671e1bba72ce77d843d2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _openCamera() { | |
var options = _getOptionsCamera(Camera.PictureSourceType.CAMERA); | |
$cordovaCamera.getPicture(options).then(function(imageUrl) { | |
UserSrv.uploadProfileImage({ | |
image : imageUrl | |
}).then(function(image) { // jshint ignore:line | |
console.log("image => "+ JSON.stringify(image)); | |
}).catch(function(err) { // jshint ignore:line | |
// console.error("error upload => "+ JSON.stringify(err)); | |
}); | |
}, function(err) { | |
// error | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment