Currently I have an Audio Blob that I converted to base64 so I can send it using post request to express js route.
index.js
var reader = new FileReader();
reader.readAsDataURL(AudioBLOB);
reader.onloadend = function() {
var base64data = reader.result;
console.log(base64data.length);
var xhr = new XMLHttpRequest();
xhr.open('POST', "/", true);
xhr.send("basecode64=" + base64data);
}
and in the express js route.
routes/root.js
app.post('/', function(req, res) {
console.log(req.query) // or req.params or req.body
}
How can I get the value of basecoe64?