javascript file upload blob code example
Example 1: upload blob to server
var file = $('#fileInput').get(0).files.item(0);
$.ajax({
type: 'POST',
url: 'upload.php',
data: file,
contentType: 'application/my-binary-type',
processData: false
});
Example 2: upload bloob javascript
var fd = new FormData();
fd.append('fname', 'test.wav');
fd.append('data', soundBlob);
$.ajax({
type: 'POST',
url: '/upload.php',
data: fd,
processData: false,
contentType: false
}).done(function(data) {
console.log(data);
});