mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
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
😭
This commit is contained in:
parent
ae6e0dd94d
commit
398b07c9c2
1 changed files with 5 additions and 2 deletions
|
@ -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();
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue