diff --git a/src/server.js b/src/server.js index 0629914..e29a440 100644 --- a/src/server.js +++ b/src/server.js @@ -71,7 +71,7 @@ function downloadResources(resources, path) { let filename = `${path}/resources/${resource.title}.${filetype}`; filename = filename.replace(/"/g, ''); log(green ('[downloaded]'), '(resource)', filename); - fs.writeFileSync(filename, response.data); + fs.writeFileSync(filename, response.data, 'binary'); }) .catch(err => { console.error(err);