title: How to upload canvas image through FormData/multipart with Jquery Ajax?
body: <p>I want to upload canvas image through <code>formdata/multipart</code>. I have a canvas which generates
   the image data with toDataURL(). I want to upload image data as <code>formdata/multipart</code> with 
   Ajax post.</p>
  
  <p>Here is the code ....</p>
  
  <pre><code>var dataUrl =  canvas.toDataURL('image/png');
  var multipart = new FormData(); 
  
  multipart.append('user_id', userID);
  multipart.append('password', pwd);
  multipart.append('inputdata',image data here);
  
   $.ajax({
              type : 'POST',
              // dataType: 'json',
              url : serviceURL,
              data : multipart,
              cache : false,
              processData : false,
              contentType : false,
              success : function(data) {
  
  
              },
              error : function(xhr, status, error) {
  
              }
  
          });
  </code></pre>
  
  <p>I know that one can not append the image data uri into FormData. So how can i append this?</p>
  
  <p>Thanks        </p>