Created
May 28, 2018 14:41
-
-
Save larryyangsen/b2f293edaefde4067e2a289756c2f188 to your computer and use it in GitHub Desktop.
axios download audio file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { data } = await axios.get(url, { | |
responseType: 'arraybuffer', | |
headers: { | |
'Content-Type': 'audio/wav' | |
} | |
}); | |
const blob = new Blob([data], { | |
type: 'audio/wav' | |
}); | |
const url = URL.createObjectURL(blob); |
Oooooops! thanks for this.
exactly what I was looking for, thanks
Thanks for the information :)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
exactly what I was looking for, thanks