2

I've a url from twilio on a react app, which I'm meant to download it's file content. But the url redirects to the actual URL which contains the file. I'd like to know if their's a way to go about it, since I had used fetch method but it's returning a CORS error message.

Note, audioSource.source contains the URL of the file.

fetch(audioSource.source, {
          mode: "no-cors",
          credentials: "include",
          method: "GET",
          // headers: headers,
        }).then(function (response) {
          console.log(audioSource.source);
          console.log(response.url);
        });
sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
Stan50
  • 43
  • 1
  • 7

0 Answers0