I'm trying to convert an image to a base64 string.
I am using an Html code to get the input image from the user. The image is of type file. In my Javascript program I made the following call and received a string that looked similar to a base64,
var name = document.getElementById("client_image").src;
where "client_image" is the id of the file in html.
My problem is that when I pass image to post to the server I get a FormatException thrown saying that I do not have a proper base64 string.
Anyway I can fix this? Also, is there any other way I can post an uploaded image to the server?
Please Help.