Use toDataURL() to get canvas data. When use this method, the canvas data returns a basd64-encoded value.
toDataURL()
I want to save the canvas data to a database later.