title: Fetching audio file via Ajax
body: <p>I need to fetch an audio file using Ajax and receive it in the form an array of bytes. My backend is on PHP.</p>
  
  <p>Currently I am using </p>
  
  <pre><code>&lt;?php 
  echo  file_get_contents("./mainFile.mp3");
  ?&gt;
  </code></pre>
  
  <p>This lets me return the audio file in the form an array of bytes. But how can I receive it in Javascript as a byte array.  I referred this <a href="https://stackoverflow.com/questions/6226189/how-to-convert-a-string-to-bytearray">link</a> on SO </p>
  
  <p>But this does not seem to be the proper way. Can anyone please suggest something ??? </p>