i saw many posts on viewing an image before uploading. one post had a very supposed to be easy method to implement using FileReader:
function readURL(input) {
if (input.files && input.files[0]) {
var reader = new FileReader();
reader.onload = function (e) {
$('#preview_image').attr('src', e.target.result);
}
reader.readAsDataURL(input.files[0]);
}
}
$("#image_input").change(function(){
readURL(this);
});
but the problem is that the image is loaded rotated! so is there a missing property that i'm missing ? or maybe FileReader is not mature enough to understand the layout of an image. no idea!
maybe I should work with a different method !? any ideas regarding the issue would be greatly appreciated.
thanks