title: FileReader.readAsDataURL result returning format exception when entered in Convert.FromBase64String
body: <p>I'm using the following to convert an image to a base64 encoded string. On the client website in javascript:</p>
  
  <pre><code>  var reader = new FileReader(); 
    reader.onloadend = function () {
                      data64 = reader.result;
                  };
  
    reader.readAsDataURL(myFile);
  </code></pre>
  
  <p>Now I pass this data to the server, which does the following:</p>
  
  <pre><code> var data = Convert.FromBase64String(data64);
  </code></pre>
  
  <p>However this results in a format exception: </p>
  
  <blockquote>
    <p>The format of s is invalid. s contains a non-base-64 character, more than two padding characters, or a non-white space-character among the padding characters.</p>
  </blockquote>
  
  <p>My input file is one of the sample images found on Windows 7 -> My Pictures/Sample Pictures/Tulips.jpeg</p>
  
  <p>How can I attempt to debug what is causing the problem for such a large result output? </p>