Hello we are having issues with FIle Upload on Chrome and Safari on IOS 
8.1.2. Some photo upload shows data with an empty strings, others are 
displaying OK. Anyone knows a workaround so the photos can be consistently 
displayed? Thanks so much.

Specifically, when a photo chosen was taken directly from the iPHONE 
camera, the data appears to be empty (see log in console)

[Log] Object (controllers.js, line 228)
src: "data:,"

However, when a photo chosen is either a Screen Shot or a photo saved from 
an email, the image is in fact displayed and the data is sent

[Log] Object (controllers.js, line 228)
src: 
"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/7QA4UGhvdG9zaG9wIDMuMAA4QklNBAQAAAAAAAA4QklNBCUAAAAAABDUHYzZjwCyBOmACZjs+EJ+/8AAEQgGYATIAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBh...."

Has anyone encountered a similar issue? Why does it work with some photos 
but not others? Anyone knows any workaround to display images that have 
been taken from the Camera itself? 

--------------
Snippets of codes here: 

$scope.getAlbumPicture = function() {
Camera.getAlbumPicture().then(function(fileURI) {
$scope.normalisePicture(fileURI, function(dataURL) {
Local.setTemp(dataURL);
$state.go('tab.camera-detail');
});
}, function(err) {
console.log(err);
});
};
$scope.readImage = function(input) {
if (input.files && input.files[0]) {
var fileReader = new FileReader();
fileReader.onloadend = function() {
$scope.normalisePicture(fileReader.result, function(dataURL) {
Local.setTemp(dataURL);
$state.go('tab.camera-detail');
});
};
fileReader.readAsDataURL(input.files[0]);
}
};

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to