Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have record a Audio wav file using html5 and storing it using XMLHttpRequest code is like below

var xhr = new XMLHttpRequest();
xhr.open('POST', '/upload.aspx', true);
xhr.onload = function (e) {
var result = e.target.result;
};
xhr.send(blob);
And on upload.aspx has below code

String AudioFileName = "Audio_" + DateTime.Now.ToString("yyyyMMdd_hhss") + ".wav";
Request.SaveAs((Server.MapPath(".") + "/Audio/" + AudioFileName), false);
Session["AudioFileName"] = Convert.ToString(AudioFileName);

In my local I have its working but with the same code on server the Audio size is 0KB or 1 KB.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900