Skip to content

Instantly share code, notes, and snippets.

@jbueza
Created March 20, 2021 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbueza/2cecc7b82f0dd76e804f6770b69ce06d to your computer and use it in GitHub Desktop.
Save jbueza/2cecc7b82f0dd76e804f6770b69ce06d to your computer and use it in GitHub Desktop.
Using nodejs and axios to download webm file
const fs = require('fs');
const axios = require('axios');
(async () => {
try {
const {data} = await axios.get(SOME_URL_TO_WEBM_FILE, {responseType: 'arraybuffer'});
return fs.writeFileSync(`test.webm`, data, 'binary');
} catch (err) {
console.log(err);
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment