How To Post Audio Blob Via Ajax In Wordpress?
I am trying to set up web-dictaphone to record audio then save it to the server. My goal is to simply have them save the audio file to the wordpress server when clicking the save b
Solution 1:
I finally got it to work like this:
var form = new FormData();
form.append('audio', blob);
form.append('action', 'wwd_save_audio');
$.ajax({
url: ajaxurl,
type: 'POST',
data: form,
processData: false,
contentType: false,
success: function (data) {
console.log('response' + JSON.stringify(data));
},
error: function () {
// handle error case here
}
});
Post a Comment for "How To Post Audio Blob Via Ajax In Wordpress?"