我有一个以这种结构存储的二进制数据:
Blob {type: "audio/wav", size: 655404, slice: function}
size: 655404
type: "audio/wav"
__proto__: Blob
这实际上是使用最近的Chrome getUerMedia()
和Recorder.js记录的声音数据。
我该如何使用 jQuery 的 post 方法将此 Blob 上传到服务器? 我已经尝试过以下方法但没有成功:
$.post('http://localhost/upload.php', { fname: "test.wav", data: soundBlob },
function(responseText) {
console.log(responseText);
});