title: I have a js drawing canvas with a save button. How can I restore image in mysql?
body: <p>my canvas code is:</p>
  <pre><code>            saveBtn: function () {
                  var saveBtn = '&lt;img height=&quot;20&quot; src=&quot;data:image/png&quot; /&gt;'
                  $(&quot;&lt;span class='simple-paint-tooltip simple-paint-buttons simple-paint-save-btn'   title='Save canvas as image' /&gt;&quot;).appendTo($(&quot;.simple-paint-top-tools&quot;));
                  $(&quot;.simple-paint-save-btn&quot;).html(saveBtn).on(&quot;click&quot;, function () {
                      var browser = method.getBrowser();
                      if (browser == &quot;IE&quot; || browser == &quot;Edge&quot;) {
                          var blob = method.canvas.msToBlob();
                          window.navigator.msSaveBlob(blob, 'Tooska_visit.png');
                      } else {
                          method.canvas.toBlob(function (blob) {
                              var objectUrl = URL.createObjectURL(blob);
                              var a = document.createElement('a');
                              a.href = objectUrl;
                              a.download = &quot;Tooska_visit.png&quot;;
                              a.target = '_blank';
                              document.body.appendChild(a);
                              a.click();
                              document.body.removeChild(a);
                              window.URL.revokeObjectURL(objectUrl);
                          });
                      }
                  });
              }
  </code></pre>
  <p>image save as a png file. I want save that in mysql database. How can I send data to mysql?</p>