Currently, my Android application is being developed with Phonegap. Users have the ability to take photos that are then stored in a mysql database (medium-blob column) using a simple INSERT INTO query without altering the data. These images are then sent server-side via a REST call (PUT).
Inside the medium-blob column, an example of the content might be:
thumb = '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDACgcHiMeG...'
According to the Phonegap documentation, images captured through the camera are encoded in base 64. However, I am encountering issues when trying to display these images from the database using the following JS code:
$('#myImg').attr("src", "data:image/png;base64," + data
Does anyone have any insights into why I may be receiving an error message stating "Image corrupted and truncated"? :(