Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pedrobrasileiro/893721901e4671e1bba72ce77d843d2e to your computer and use it in GitHub Desktop.
Save pedrobrasileiro/893721901e4671e1bba72ce77d843d2e to your computer and use it in GitHub Desktop.
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