AdiA
Reactiflux5y ago
3 replies
Adi

Adi – 16-14 Jan 29

I am getting res.pipe() is not a function error any idea why so?
code:
const saveMediaToDisk = (url, path) => {
    const localpath = fs.createWriteStream(path);

    return axios.get(url).then(res => res.pipe(localpath)).catch(error => console.log("error", error));
}
Was this page helpful?