This commit is contained in:
Abhinav Adduri 2017-05-30 14:41:31 -07:00
parent 82eccc6d54
commit 1800f87065
3 changed files with 21 additions and 67 deletions

5
app.js
View file

@ -29,7 +29,6 @@ app.get('/assets/download/:id', function(req, res) {
res.send('error');
} else {
res.setHeader('Content-Disposition', 'attachment; filename=' + reply);
// res.setHeader('Content-Transfer-Encoding', 'binary');
res.setHeader('Content-Type', 'application/octet-stream');
res.download(__dirname + '/static/' + reply);
@ -54,7 +53,7 @@ app.route('/upload/:id')
client.hset(id, "filename", filename, redis.print);
client.hset(id, "expiration", 0, redis.print);
console.log("Upload Finished of " + filename);
res.send(id); //where to go next
res.send(id);
});
});
});
@ -62,6 +61,6 @@ app.route('/upload/:id')
app.listen(3000, function () {
console.log('Example app listening on port 3000!')
console.log('Portal app listening on port 3000!')
})