title: How to convert a captured media file into base64 using javascript?
body: <p>I am developing an application using phone gap. I capture image/audio/video and store its path in local storage. I need to fetch base64 of captured file and store it in the database and then sync it with server. Is that possible using javascript ? </p>
  
  <p>I tried using FileReader API that phone gap provides but the function reader.onloadend() does not get executed. </p>
  
  <p>Could manage to get base64 of image using a canvas but is it possible to get base64 for audio and video using canvas? </p>
  
  <p>Thanks.</p>