Skip to content

Commit

Permalink
closes #6: corrupt pdfs
Browse files Browse the repository at this point in the history
  • Loading branch information
shogerr committed Jun 10, 2020
1 parent 04fd6a6 commit 1fb6400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1fb6400

Please sign in to comment.