title: Send blob from .js file to php with ajax
body: <p>So i have a page set up that needs to send a blob variable to a php page. The php page then uploads the blob to mysql using pdo. I have the ajax set up so it sends just a text variable and uploads it just fine. However when I try to do a blob it will not work.</p>
  
  <p>Main page</p>
  
  <pre><code>    var blob = new Blob(["i am a blob"]);
  
     $.ajax({
  
        type: 'POST',
        url: 'test.php',
        data: {roll: blob},
      });
  </code></pre>
  
  <p>Php page</p>
  
  <pre><code>$got = $_POST['roll']; //gets the variable
  
  $pdo = new PDO('mysql:host='. $host .';dbname='.$db_name, $db_username, $db_password);
      $query = $pdo-&gt;prepare('INSERT INTO books (test,rec) VALUES (?,?)'); 
      $query-&gt;bindValue(1, '35');
      $query-&gt;bindValue(2, $rollv);
      $query-&gt;execute();
  </code></pre>