Return Error is the archive is not uploaded correctly.
This commit is contained in:
@@ -120,6 +120,12 @@ app.get('/publish', async (req, res) => {
|
|||||||
body,
|
body,
|
||||||
headers: {'Content-Type': 'application/zip'}
|
headers: {'Content-Type': 'application/zip'}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (response.status !== 200) {
|
||||||
|
res.json({success: false, message: "Can't upload the archive, permissions error."});
|
||||||
|
await fs.unlink('./dist.zip');
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
res.json({success: true});
|
res.json({success: true});
|
||||||
|
|||||||
Reference in New Issue
Block a user