Rohit Gupta

Rohit Gupta

  • 73
  • 26.2k
  • 2.9m

Upload HTML Canvas image to Azure Blob storage

Jan 6 2023 6:04 AM

Hi,

I am trying to upload a signature (which is in Canvas.toDataURL() format) to Azure Blob Storage. The problem I am facing is that the image I am getting is not in the form that azure accepts.

Can anyone help me with how I can convert it to the required form?

var image = element.toDataURL("image/png").replace("image/png", "image/octet-stream"); 
localStorage.setItem('SignatureValue',image);
window.location.href=image;
return image;

 


Answers (2)