const saveMediaToDisk = (url, path) => {
const localpath = fs.createWriteStream(path);
return axios.get(url).then(res => res.pipe(localpath)).catch(error => console.log("error", error));
}const saveMediaToDisk = (url, path) => {
const localpath = fs.createWriteStream(path);
return axios.get(url).then(res => res.pipe(localpath)).catch(error => console.log("error", error));
}