changed to unlinkSync

This commit is contained in:
Abhinav Adduri 2017-05-31 10:11:00 -07:00
parent ab86ecf90e
commit aad54b34b9

2
app.js
View file

@ -34,7 +34,7 @@ app.get('/assets/download/:id', function(req, res) {
res.download(__dirname + '/static/' + id, reply, function(err) { res.download(__dirname + '/static/' + id, reply, function(err) {
if (!err) { if (!err) {
client.del(id); client.del(id);
fs.unlink(__dirname + '/static/' + id); fs.unlinkSync(__dirname + '/static/' + id);
} }
}); });
} }