From 398b07c9c26eaccc9ca3d9d3e699896d481927ba Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 18 Feb 2016 13:49:42 +0000 Subject: [PATCH] Fetch about page images properly - Apparently I really didn't test this very well... ... turns out I was looking at the built assets folder instead of the client/public folder ... and this wasn't working at all :sob: --- Gruntfile.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 203d6f5a9a..1b6510fb86 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -839,8 +839,11 @@ var _ = require('lodash'), downloadImagePromise = function (url, name) { return new Promise(function (resolve, reject) { - https.get(url, function (res) { - fs.writeFile(imagePath + name, res, function () { + var file = fs.createWriteStream(path.join(__dirname, imagePath, name)); + https.get(url, function (response) { + response.pipe(file); + file.on('finish', function () { + file.close(); resolve(); }); })