I want to publish an audio file on my server. Here is how I am trying to do:
var fd = new FormData();
fd.append('fname', 'test.wav');
fd.append('data', soundBlob);
$.ajax({
type: 'POST',
url: '/test/testMethod',
data: fd,
processData: false,
contentType: false
}).done(function(data) {
console.log(data);
});
And on the server side, I have a method:
[HttpPost]
public void testMethod(??What datatype?? postedData)
{
}
What will be the data type for the parameter postedData
? I tried using an object and a byte data type. Any help would help.
source
share