title: ngCordova file_uri to base64
body: <p>I'm trying to use ngCordova's camera plugin (<a href="http://ngcordova.com/docs/plugins/camera/" rel="nofollow">http://ngcordova.com/docs/plugins/camera/</a>) to get pictures from my iphone and send it to my server. The backend developer wants me to encode it to base64. my data model looks like this </p>
  
  <pre><code>[{image_name:"foo", link: //base64 string}]
  </code></pre>
  
  <p>this is what my code looks like</p>
  
  <pre><code>$scope.getPictureFromGallery = function() {  $cordovaCamera.getPicture(options).then(function(imageURI) {
  
  
       $scope.image = imageURI;
  
  
      }, function(err) {
        // error
      });
  
    };
  </code></pre>