-1

The documentation here works great, but when I add the code to my application, the getPhoto part returns 'content://media/external/images/media/16053' and doesn't load the image into the img element, it uploads to the server fine. It's just on my application using onsen does it fail..

photo.html

<img src="{{ image }}" id="uploadImage">

app.js

$scope.onPhotoDataSuccess = function(fileURI) 
{
   console.log(fileURI);
   myNavigator.pushPage('photo.html', {animation : 'none'});

   $scope.image = fileURI;
}

I've tried adding a model,var attribute to the img element, but responds with null..

jason
  • 117
  • 1
  • 5

1 Answers1

0

Use ng-src instead of src in image tag , so that it will be in angular context. Also I believe fileURI is in form of base 64..so you need to append to data:image/png;base64 to the image source !

user1608841
  • 2,455
  • 1
  • 27
  • 40