title: Email a Javascript object with PHP
body: <p>I have a JavaScript function that downloads a JPG of a finger swipe signature of a user. I would like to be able to take that object and mail it via PHP but am unsure how I could possibly do this without having to download the file first, then upload it. Below is my JavaScript function.</p>
  
  <pre><code>saveJPGButton.addEventListener("click", function (event) {
    if (signaturePad.isEmpty()) {
      alert("Please provide a signature first.");
    } else {
      var dataURL = signaturePad.toDataURL("image/jpeg");
      download(dataURL, "signature.jpg");
    }
  });
  </code></pre>