Andrew Davidsburg
Posts: 0
Joined: Sun Aug 03, 2014 5:29 pm

Database image to base64 via Javascript

Hi I am trying to pull images from my database into base64 to store in an indexeddb locally via a javascript call. I'm using the code below to pull the image but the data isn't returned in anything I can work with.

get_image_from_db.execute({
query: {
file_name: flight_1['_id']
},
complete: function(data) {
console.log(data.responsText);
}

Code: Select all

     }); 

Thanks!

Andrew

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Database image to base64 via Javascript

How about doing a mapping like this to a image component like this

Image

And check out the data being returned in the JS. That i believe is the base64 data that you can work with...

I think you may even be able to map the data to a local storage variable and then work on that

Cheers,
M&M

Return to “Issues”