We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have added the following code into MediaStreamRecorder.js
`function uploadToPHPServer(blob) { var file = new File([blob], 'msr-' + (new Date).toISOString().replace(/:|./g, '-') + '.wav', { type: 'audio/wav' });
// create FormData var formData = new FormData(); formData.append('audio-filename', file.name); formData.append('adio-blob', file); makeXMLHttpRequest('https://devweb2017.cis.strath.ac.uk/~pqb14180/MediaStreamRecorder/save.php', formData, function() { var downloadURL = 'https://devweb2017.cis.strath.ac.uk/~pqb14180/MediaStreamRecorder/uploads/' + file.name; console.log('File uploaded to this path:', downloadURL); });
}
function makeXMLHttpRequest(url, data, callback) { var request = new XMLHttpRequest(); request.onreadystatechange = function() { if (request.readyState == 4 && request.status == 200) { callback(); } }; request.open('POST', url); request.send(data); }`
I get this message in developer tools console:
File uploaded to this path: https://devweb2017.cis.strath.ac.uk/~pqb14180/MediaStreamRecorder/uploads/msr-2018-01-22T20-37-27-348Z.wav
However the file does not exits, any ideas?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have added the following code into MediaStreamRecorder.js
`function uploadToPHPServer(blob) {
var file = new File([blob], 'msr-' + (new Date).toISOString().replace(/:|./g, '-') + '.wav', {
type: 'audio/wav'
});
}
function makeXMLHttpRequest(url, data, callback) {
var request = new XMLHttpRequest();
request.onreadystatechange = function() {
if (request.readyState == 4 && request.status == 200) {
callback();
}
};
request.open('POST', url);
request.send(data);
}`
I get this message in developer tools console:
However the file does not exits, any ideas?
The text was updated successfully, but these errors were encountered: