I want to upload image file into couchdb using javascript. For this i am using inline attachment concept. while uploading file i have to use Base64 encode(). This method has string argument only. How can i convert image file to base64 String using javascript. Please can anybody share me the sample snippet.
Thanks
You can use
canvasin browsers that support it, as long as the image is loaded from the same domain.See an example here.