mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
Added error handling to filestream
This would have probably rejected the promise anyway because uncaught error, but it's better to be explicit
This commit is contained in:
parent
d40a44b9a0
commit
5e9bf5cfb5
@ -108,6 +108,7 @@ module.exports.uploadZip = (options = {}) => {
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.createReadStream(options.zipPath)
|
||||
.on('error', reject)
|
||||
.pipe(request.post(reqOptions, (err, res) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
|
Loading…
Reference in New Issue
Block a user