Answer the question
In order to leave comments, you need to log in
404 in GET request how to fix?
On the client side, a GET request is made in JS, the file itself is generated in PHP. When you click on the link
Here is the code itself, data.msg should be there, the file itself is generated:
$.get(
"https://api.demo.com/voice.php",
{
text: data.msg
},
);
var audio = new Audio('https://demo.com/' + data.msg + '.mp3');
audio.play();
Answer the question
In order to leave comments, you need to log in
Most likely you are not giving the correct headers when generating the file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question