0

I have a blob with a file and want to attach it to a form.

This is my code:

var blob = getBlob(); //has the blob
var form = document.querySelector('.my-form');
var formData = new FormData(form);
formData.append('imageFile', blob);

Then when I submit the form to a send.php file, I try this:

echo $_FILES['imageFile']['tmp_name'];

and get nothing. What am I doing wrong here? Thanks in advance!

nick
  • 2,397
  • 4
  • 26
  • 46

0 Answers0